From 222e8cdac783351444db105429fdc3a986a60a14 Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Wed, 12 Nov 2008 23:23:51 -0800 Subject: [PATCH] --- yaml --- r: 119073 b: refs/heads/master c: 9c0188acf6dd6990bac9cd906cd554a1476c6d12 h: refs/heads/master i: 119071: 54411f9f0f9e294c77d07baccab0d1122066d501 v: v3 --- [refs] | 2 +- trunk/net/ipv4/ip_input.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d1b6f35807db..205d99d52756 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6e093d9dfffc9a02cd54d36904c62f705f09900a +refs/heads/master: 9c0188acf6dd6990bac9cd906cd554a1476c6d12 diff --git a/trunk/net/ipv4/ip_input.c b/trunk/net/ipv4/ip_input.c index 861978a4f1a8..cfb38ac9d698 100644 --- a/trunk/net/ipv4/ip_input.c +++ b/trunk/net/ipv4/ip_input.c @@ -209,9 +209,17 @@ static int ip_local_deliver_finish(struct sk_buff *skb) hash = protocol & (MAX_INET_PROTOS - 1); ipprot = rcu_dereference(inet_protos[hash]); - if (ipprot != NULL && (net == &init_net || ipprot->netns_ok)) { + if (ipprot != NULL) { int ret; + if (!net_eq(net, &init_net) && !ipprot->netns_ok) { + if (net_ratelimit()) + printk("%s: proto %d isn't netns-ready\n", + __func__, protocol); + kfree_skb(skb); + goto out; + } + if (!ipprot->no_policy) { if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { kfree_skb(skb);