mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
netfilter: bridge: make BRNF_PKT_TYPE flag a bool
nf_bridge_info->mask is used for several things, for example to remember if skb->pkt_type was set to OTHER_HOST. For a bridge, OTHER_HOST is expected case. For ip forward its a non-starter though -- routing expects PACKET_HOST. Bridge netfilter thus changes OTHER_HOST to PACKET_HOST before hook invocation and then un-does it after hook traversal. This information is irrelevant outside of br_netfilter. After this change, ->mask now only contains flags that need to be known outside of br_netfilter in fast-path. Future patch changes mask into a 2bit state field in sk_buff, so that we can remove skb->nf_bridge pointer for good and consider all remaining places that access nf_bridge info content a not-so fastpath. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
3eaf402502
commit
a1e67951e6
3 changed files with 10 additions and 10 deletions
|
|
@ -17,7 +17,6 @@ enum nf_br_hook_priorities {
|
|||
|
||||
#if IS_ENABLED(CONFIG_BRIDGE_NETFILTER)
|
||||
|
||||
#define BRNF_PKT_TYPE 0x01
|
||||
#define BRNF_BRIDGED_DNAT 0x02
|
||||
#define BRNF_NF_BRIDGE_PREROUTING 0x08
|
||||
|
||||
|
|
|
|||
|
|
@ -171,6 +171,7 @@ struct nf_bridge_info {
|
|||
BRNF_PROTO_8021Q,
|
||||
BRNF_PROTO_PPPOE
|
||||
} orig_proto;
|
||||
bool pkt_otherhost;
|
||||
unsigned int mask;
|
||||
struct net_device *physindev;
|
||||
struct net_device *physoutdev;
|
||||
|
|
|
|||
Loading…
Reference in a new issue