mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00:00
net: add CONFIG_NET_INGRESS to enable ingress filtering
This new config switch enables the ingress filtering infrastructure that is controlled through the ingress_needed static key. This prepares the introduction of the Netfilter ingress hook that resides under this unique static key. Note that CONFIG_SCH_INGRESS automatically selects this, that should be no problem since this also depends on CONFIG_NET_CLS_ACT. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Acked-by: Alexei Starovoitov <ast@plumgrid.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
b8d0aad0c7
commit
1cf51900f8
4 changed files with 9 additions and 4 deletions
|
@ -1630,7 +1630,7 @@ int call_netdevice_notifiers(unsigned long val, struct net_device *dev)
|
|||
}
|
||||
EXPORT_SYMBOL(call_netdevice_notifiers);
|
||||
|
||||
#ifdef CONFIG_NET_CLS_ACT
|
||||
#ifdef CONFIG_NET_INGRESS
|
||||
static struct static_key ingress_needed __read_mostly;
|
||||
|
||||
void net_inc_ingress_queue(void)
|
||||
|
@ -3798,13 +3798,14 @@ another_round:
|
|||
}
|
||||
|
||||
skip_taps:
|
||||
#ifdef CONFIG_NET_CLS_ACT
|
||||
#ifdef CONFIG_NET_INGRESS
|
||||
if (static_key_false(&ingress_needed)) {
|
||||
skb = handle_ing(skb, &pt_prev, &ret, orig_dev);
|
||||
if (!skb)
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
#endif
|
||||
#ifdef CONFIG_NET_CLS_ACT
|
||||
skb->tc_verd = 0;
|
||||
ncls:
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue