diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index f6944ecd5b2e..472676dd550e 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -2107,6 +2107,10 @@ int netif_receive_skb(struct sk_buff *skb) | |||
2107 | 2107 | ||
2108 | rcu_read_lock(); | 2108 | rcu_read_lock(); |
2109 | 2109 | ||
2110 | /* Don't receive packets in an exiting network namespace */ | ||
2111 | if (!net_alive(dev_net(skb->dev))) | ||
2112 | goto out; | ||
2113 | |||
2110 | #ifdef CONFIG_NET_CLS_ACT | 2114 | #ifdef CONFIG_NET_CLS_ACT |
2111 | if (skb->tc_verd & TC_NCLS) { | 2115 | if (skb->tc_verd & TC_NCLS) { |
2112 | skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); | 2116 | skb->tc_verd = CLR_TC_NCLS(skb->tc_verd); |
@@ -3034,7 +3038,7 @@ EXPORT_SYMBOL(dev_unicast_delete); | |||
3034 | /** | 3038 | /** |
3035 | * dev_unicast_add - add a secondary unicast address | 3039 | * dev_unicast_add - add a secondary unicast address |
3036 | * @dev: device | 3040 | * @dev: device |
3037 | * @addr: address to delete | 3041 | * @addr: address to add |
3038 | * @alen: length of @addr | 3042 | * @alen: length of @addr |
3039 | * | 3043 | * |
3040 | * Add a secondary unicast address to the device or increase | 3044 | * Add a secondary unicast address to the device or increase |