|
|
5a989b |
From cd92b8f8ad9c7594cc259c312234f658bcc5f144 Mon Sep 17 00:00:00 2001
|
|
|
5a989b |
From: Phil Sutter <phil@nwl.cc>
|
|
|
5a989b |
Date: Tue, 10 Sep 2019 14:02:30 +0200
|
|
|
5a989b |
Subject: [PATCH] nfct: helper: Fix NFCTH_ATTR_PROTO_L4NUM size
|
|
|
5a989b |
|
|
|
5a989b |
Kernel defines NFCTH_TUPLE_L4PROTONUM as of type NLA_U8. When adding a
|
|
|
5a989b |
helper, NFCTH_ATTR_PROTO_L4NUM attribute is correctly set using
|
|
|
5a989b |
nfct_helper_attr_set_u8(), though when deleting
|
|
|
5a989b |
nfct_helper_attr_set_u32() was incorrectly used. Due to alignment, this
|
|
|
5a989b |
causes trouble only on Big Endian.
|
|
|
5a989b |
|
|
|
5a989b |
Fixes: 5e8f64f46cb1d ("conntrackd: add cthelper infrastructure (+ example FTP helper)")
|
|
|
5a989b |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
5a989b |
Acked-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
|
5a989b |
(cherry picked from commit 7c5f4b390f4b8dc02aceb0a18ed7c59ff14f392c)
|
|
|
5a989b |
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
|
5a989b |
---
|
|
|
5a989b |
src/nfct-extensions/helper.c | 2 +-
|
|
|
5a989b |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
5a989b |
|
|
|
5a989b |
diff --git a/src/nfct-extensions/helper.c b/src/nfct-extensions/helper.c
|
|
|
5a989b |
index 0569827612f06..e5d8d0a905df0 100644
|
|
|
5a989b |
--- a/src/nfct-extensions/helper.c
|
|
|
5a989b |
+++ b/src/nfct-extensions/helper.c
|
|
|
5a989b |
@@ -284,7 +284,7 @@ nfct_cmd_helper_delete(struct mnl_socket *nl, int argc, char *argv[])
|
|
|
5a989b |
nfct_perror("unsupported layer 4 protocol");
|
|
|
5a989b |
return -1;
|
|
|
5a989b |
}
|
|
|
5a989b |
- nfct_helper_attr_set_u32(t, NFCTH_ATTR_PROTO_L4NUM, l4proto);
|
|
|
5a989b |
+ nfct_helper_attr_set_u8(t, NFCTH_ATTR_PROTO_L4NUM, l4proto);
|
|
|
5a989b |
}
|
|
|
5a989b |
|
|
|
5a989b |
seq = time(NULL);
|
|
|
5a989b |
--
|
|
|
5a989b |
2.22.0
|
|
|
5a989b |
|