]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
netfilter: helper: add build-time asserts for helper data size
authorFlorian Westphal <fw@strlen.de>
Sat, 15 Apr 2017 23:29:15 +0000 (01:29 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 19 Apr 2017 15:55:16 +0000 (17:55 +0200)
commitdcf67740f22d31be685d7172f05b289c8243ea12
treee7f9efc1a8a7a1115b15ce1a1576ffa4f58a0c9c
parent906535b04671c84ec8731030d4968570d8d2a16c
netfilter: helper: add build-time asserts for helper data size

add a 32 byte scratch area in the helper struct instead of relying
on variable sized helpers plus compile-time asserts to let us know
if 32 bytes aren't enough anymore.

Not having variable sized helpers will later allow to add BUILD_BUG_ON
for the total size of conntrack extensions -- the helper extension is
the only one that doesn't have a fixed size.

The (useless!) NF_CT_HELPER_BUILD_BUG_ON(0); are added so that in case
someone adds a new helper and copy-pastes from one that doesn't store
private data at least some indication that this macro should be used
somehow is there...

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_helper.h
net/netfilter/nf_conntrack_amanda.c
net/netfilter/nf_conntrack_ftp.c
net/netfilter/nf_conntrack_h323_main.c
net/netfilter/nf_conntrack_netbios_ns.c
net/netfilter/nf_conntrack_pptp.c
net/netfilter/nf_conntrack_sane.c
net/netfilter/nf_conntrack_sip.c
net/netfilter/nf_conntrack_tftp.c