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