summaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2017-04-16 01:29:19 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2017-04-19 17:55:17 +0200
commitb3a5db109e0670d6d168e9cd9de4d272a68f7c35 (patch)
treeae23e5a9d0b2fd061130076bedc9560852cb11ef /include/net
parentnetfilter: remove last traces of variable-sized extensions (diff)
downloadlinux-b3a5db109e0670d6d168e9cd9de4d272a68f7c35.tar.xz
linux-b3a5db109e0670d6d168e9cd9de4d272a68f7c35.zip
netfilter: conntrack: use u8 for extension sizes again
commit 223b02d923ecd7c84cf9780bb3686f455d279279 ("netfilter: nf_conntrack: reserve two bytes for nf_ct_ext->len") had to increase size of the extension offsets because total size of the extensions had increased to a point where u8 did overflow. 3 years later we've managed to diet extensions a bit and we no longer need u16. Furthermore we can now add a compile-time assertion for this problem. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netfilter/nf_conntrack_extend.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h
index 4ec645c8b647..5fc908dc9f32 100644
--- a/include/net/netfilter/nf_conntrack_extend.h
+++ b/include/net/netfilter/nf_conntrack_extend.h
@@ -43,8 +43,8 @@ enum nf_ct_ext_id {
/* Extensions: optional stuff which isn't permanently in struct. */
struct nf_ct_ext {
struct rcu_head rcu;
- u16 offset[NF_CT_EXT_NUM];
- u16 len;
+ u8 offset[NF_CT_EXT_NUM];
+ u8 len;
char data[0];
};