diff options
author | Florian Westphal <fw@strlen.de> | 2016-02-25 10:08:37 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-03-02 20:05:25 +0100 |
commit | 5f6c253ebe93b02dece01c6f58447f16b29f6dd3 (patch) | |
tree | 0e9391675ac24d5108d65b844bd54c9a3cb2fe4b /kernel/bpf/arraymap.c | |
parent | b9e69e127397187b70c813a4397cce7afb5e8cb1 (diff) | |
download | linux-5f6c253ebe93b02dece01c6f58447f16b29f6dd3.tar.gz linux-5f6c253ebe93b02dece01c6f58447f16b29f6dd3.tar.bz2 linux-5f6c253ebe93b02dece01c6f58447f16b29f6dd3.zip |
netfilter: bridge: register hooks only when bridge interface is added
This moves bridge hooks to a register-when-needed scheme.
We use a device notifier to register the 'call-iptables' netfilter hooks
only once a bridge gets added.
This means that if the initial namespace uses a bridge, newly created
network namespaces no longer get the PRE_ROUTING ipt_sabotage hook.
It will registered in that network namespace once a bridge is created
within that namespace.
A few modules still use global hooks:
- conntrack
- bridge PF_BRIDGE hooks
- IPVS
- CLUSTER match (deprecated)
- SYNPROXY
As long as these modules are not loaded/used, a new network namespace has
empty hook list and NF_HOOK() will boil down to single list_empty test even
if initial namespace does stateless packet filtering.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'kernel/bpf/arraymap.c')
0 files changed, 0 insertions, 0 deletions