diff options
author | Denis V. Lunev <den@openvz.org> | 2008-03-24 18:32:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-24 18:32:09 -0400 |
commit | 0be43f82c4f4c4a999b53cf794513f7f1a4ed7f3 (patch) | |
tree | 6ca7893fd93f4cfe960c022452309127f88485ed /net | |
parent | 05cf89d40c85e622dac20e44713168767be5c520 (diff) |
[NETNS]: Process netfilter hooks in initial namespace only.
There were no packets in the namespace other than initial
previously. This will be changed in the neareast future. Netfilters
are not namespace aware and should be processed in the initial
namespace only for now.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/netfilter/core.c b/net/netfilter/core.c index c4065b8f9a95..ec05684c56d7 100644 --- a/net/netfilter/core.c +++ b/net/netfilter/core.c | |||
@@ -165,6 +165,14 @@ int nf_hook_slow(int pf, unsigned int hook, struct sk_buff *skb, | |||
165 | unsigned int verdict; | 165 | unsigned int verdict; |
166 | int ret = 0; | 166 | int ret = 0; |
167 | 167 | ||
168 | #ifdef CONFIG_NET_NS | ||
169 | struct net *net; | ||
170 | |||
171 | net = indev == NULL ? outdev->nd_net : indev->nd_net; | ||
172 | if (net != &init_net) | ||
173 | return 1; | ||
174 | #endif | ||
175 | |||
168 | /* We may already have this, but read-locks nest anyway */ | 176 | /* We may already have this, but read-locks nest anyway */ |
169 | rcu_read_lock(); | 177 | rcu_read_lock(); |
170 | 178 | ||