From: Patrick McHardy <kaber@trash.net>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH libnftables]: expr/cmp: fix type size
Date: Wed, 15 Jan 2014 07:31:25 +0000 [thread overview]
Message-ID: <20140115073124.GA17045@macbook.localnet> (raw)
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 */
};
};
reply other threads:[~2014-01-15 7:31 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140115073124.GA17045@macbook.localnet \
--to=kaber@trash.net \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).