diff options
Diffstat (limited to 'net/ipv4/ipmr.c')
-rw-r--r-- | net/ipv4/ipmr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 35683e1a42e8..036598835c63 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
@@ -1083,13 +1083,18 @@ int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg) | |||
1083 | 1083 | ||
1084 | static int ipmr_device_event(struct notifier_block *this, unsigned long event, void *ptr) | 1084 | static int ipmr_device_event(struct notifier_block *this, unsigned long event, void *ptr) |
1085 | { | 1085 | { |
1086 | struct net_device *dev = ptr; | ||
1086 | struct vif_device *v; | 1087 | struct vif_device *v; |
1087 | int ct; | 1088 | int ct; |
1089 | |||
1090 | if (dev->nd_net != &init_net) | ||
1091 | return NOTIFY_DONE; | ||
1092 | |||
1088 | if (event != NETDEV_UNREGISTER) | 1093 | if (event != NETDEV_UNREGISTER) |
1089 | return NOTIFY_DONE; | 1094 | return NOTIFY_DONE; |
1090 | v=&vif_table[0]; | 1095 | v=&vif_table[0]; |
1091 | for (ct=0;ct<maxvif;ct++,v++) { | 1096 | for (ct=0;ct<maxvif;ct++,v++) { |
1092 | if (v->dev==ptr) | 1097 | if (v->dev==dev) |
1093 | vif_delete(ct); | 1098 | vif_delete(ct); |
1094 | } | 1099 | } |
1095 | return NOTIFY_DONE; | 1100 | return NOTIFY_DONE; |