aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/nf_defrag_ipv4.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2015-07-23 16:21:30 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2015-07-30 13:37:42 +0200
commit72b1e5e4cac72efa6b739b47e41f53e4520b4194 (patch)
treebb0bc144905b1e5f83ffae53de5590f07283af9f /net/ipv4/netfilter/nf_defrag_ipv4.c
parentnetfilter: nf_ct_sctp: minimal multihoming support (diff)
downloadlinux-dev-72b1e5e4cac72efa6b739b47e41f53e4520b4194.tar.xz
linux-dev-72b1e5e4cac72efa6b739b47e41f53e4520b4194.zip
netfilter: bridge: reduce nf_bridge_info to 32 bytes again
We can use union for most of the temporary cruft (original ipv4/ipv6 address, source mac, physoutdev) since they're used during different stages of br netfilter traversal. Also get rid of the last two ->mask users. Shrinks struct from 48 to 32 on 64bit arch. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv4/netfilter/nf_defrag_ipv4.c')
-rw-r--r--net/ipv4/netfilter/nf_defrag_ipv4.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ipv4/netfilter/nf_defrag_ipv4.c b/net/ipv4/netfilter/nf_defrag_ipv4.c
index c88b7d434718..b69e82bda215 100644
--- a/net/ipv4/netfilter/nf_defrag_ipv4.c
+++ b/net/ipv4/netfilter/nf_defrag_ipv4.c
@@ -49,12 +49,9 @@ static enum ip_defrag_users nf_ct_defrag_user(unsigned int hooknum,
if (skb->nfct)
zone = nf_ct_zone((struct nf_conn *)skb->nfct);
#endif
-
-#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
- if (skb->nf_bridge &&
- skb->nf_bridge->mask & BRNF_NF_BRIDGE_PREROUTING)
+ if (nf_bridge_in_prerouting(skb))
return IP_DEFRAG_CONNTRACK_BRIDGE_IN + zone;
-#endif
+
if (hooknum == NF_INET_PRE_ROUTING)
return IP_DEFRAG_CONNTRACK_IN + zone;
else