All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libnftables]: expr/cmp: fix type size
@ 2014-01-15  7:31 Patrick McHardy
  0 siblings, 0 replies; only message in thread
From: Patrick McHardy @ 2014-01-15  7:31 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Pushed to next-3.14.

commit 3177a0d6f4be42775c128c02afe7de78dc3ea99d
Author: Patrick McHardy <kaber@trash.net>
Date:   Wed Jan 15 07:28:20 2014 +0000

    expr/cmp: fix type size
    
    Since nftables now uses nft_rule_expr_get_u32(), the internal size must
    also be a uint32_t.
    
    Fixes complete breakage of any cmp or meta expression.
    
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/src/expr/cmp.c b/src/expr/cmp.c
index 246f22f..1c5787e 100644
--- a/src/expr/cmp.c
+++ b/src/expr/cmp.c
@@ -26,8 +26,8 @@
 
 struct nft_expr_cmp {
 	union nft_data_reg	data;
-	uint8_t			sreg;	/* enum nft_registers */
-	uint8_t			op;	/* enum nft_cmp_ops */
+	uint32_t		sreg;	/* enum nft_registers */
+	uint32_t		op;	/* enum nft_cmp_ops */
 };
 
 static int
diff --git a/src/expr/meta.c b/src/expr/meta.c
index 490d64a..74ecdb3 100644
--- a/src/expr/meta.c
+++ b/src/expr/meta.c
@@ -27,10 +27,10 @@
 #endif
 
 struct nft_expr_meta {
-	uint8_t			key;	/* enum nft_meta_keys */
+	uint32_t		key;	/* enum nft_meta_keys */
 	union {
-		uint8_t		dreg;	/* enum nft_registers */
-		uint8_t		sreg;   /* enum nft_registers */
+		uint32_t	dreg;	/* enum nft_registers */
+		uint32_t	sreg;   /* enum nft_registers */
 	};
 };
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-01-15  7:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-15  7:31 [PATCH libnftables]: expr/cmp: fix type size Patrick McHardy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.