Blame SOURCES/0006-nfct-helper-Fix-NFCTH_ATTR_PROTO_L4NUM-size.patch

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