aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/ip_input.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c
index 861978a4f1a8..cfb38ac9d698 100644
--- a/net/ipv4/ip_input.c
+++ b/net/ipv4/ip_input.c
@@ -209,9 +209,17 @@ static int ip_local_deliver_finish(struct sk_buff *skb)
209 209
210 hash = protocol & (MAX_INET_PROTOS - 1); 210 hash = protocol & (MAX_INET_PROTOS - 1);
211 ipprot = rcu_dereference(inet_protos[hash]); 211 ipprot = rcu_dereference(inet_protos[hash]);
212 if (ipprot != NULL && (net == &init_net || ipprot->netns_ok)) { 212 if (ipprot != NULL) {
213 int ret; 213 int ret;
214 214
215 if (!net_eq(net, &init_net) && !ipprot->netns_ok) {
216 if (net_ratelimit())
217 printk("%s: proto %d isn't netns-ready\n",
218 __func__, protocol);
219 kfree_skb(skb);
220 goto out;
221 }
222
215 if (!ipprot->no_policy) { 223 if (!ipprot->no_policy) {
216 if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { 224 if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {
217 kfree_skb(skb); 225 kfree_skb(skb);