]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_defrag: move NF_CONNTRACK bits into #ifdef
authorArnd Bergmann <arnd@arndb.de>
Mon, 15 Jan 2018 15:49:06 +0000 (16:49 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 16 Jan 2018 00:52:08 +0000 (01:52 +0100)
commitb968ff6e9a2429e68f644d1f10b8a7264b537de9
treef3f4b911c90ced11c4e0ca09a438c74b31ae9cf3
parent114e0572c210f429e57e777d3749db87ac80477c
netfilter: nf_defrag: move NF_CONNTRACK bits into #ifdef

We cannot access the skb->_nfct field when CONFIG_NF_CONNTRACK is
disabled:

net/ipv4/netfilter/nf_defrag_ipv4.c: In function 'ipv4_conntrack_defrag':
net/ipv4/netfilter/nf_defrag_ipv4.c:83:9: error: 'struct sk_buff' has no member named '_nfct'
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c: In function 'ipv6_defrag':
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c:68:9: error: 'struct sk_buff' has no member named '_nfct'

Both functions already have an #ifdef for this, so let's move the
check in there.

Fixes: 35a7e70c5056 ("netfilter: nf_defrag: Skip defrag if NOTRACK is set")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/nf_defrag_ipv4.c
net/ipv6/netfilter/nf_defrag_ipv6_hooks.c