aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netfilter_bridge.h
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 /include/linux/netfilter_bridge.h
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 'include/linux/netfilter_bridge.h')
-rw-r--r--include/linux/netfilter_bridge.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/netfilter_bridge.h b/include/linux/netfilter_bridge.h
index 6d80fc686323..2437b8a5d7a9 100644
--- a/include/linux/netfilter_bridge.h
+++ b/include/linux/netfilter_bridge.h
@@ -17,9 +17,6 @@ enum nf_br_hook_priorities {
#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
-#define BRNF_BRIDGED_DNAT 0x02
-#define BRNF_NF_BRIDGE_PREROUTING 0x08
-
int br_handle_frame_finish(struct sock *sk, struct sk_buff *skb);
static inline void br_drop_fake_rtable(struct sk_buff *skb)
@@ -63,8 +60,17 @@ nf_bridge_get_physoutdev(const struct sk_buff *skb)
{
return skb->nf_bridge ? skb->nf_bridge->physoutdev : NULL;
}
+
+static inline bool nf_bridge_in_prerouting(const struct sk_buff *skb)
+{
+ return skb->nf_bridge && skb->nf_bridge->in_prerouting;
+}
#else
#define br_drop_fake_rtable(skb) do { } while (0)
+static inline bool nf_bridge_in_prerouting(const struct sk_buff *skb)
+{
+ return false;
+}
#endif /* CONFIG_BRIDGE_NETFILTER */
#endif