diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/ipvs/ip_vs_ctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c index d43e3c122f7..84444dda194 100644 --- a/net/netfilter/ipvs/ip_vs_ctl.c +++ b/net/netfilter/ipvs/ip_vs_ctl.c | |||
@@ -1521,11 +1521,12 @@ static int ip_vs_dst_event(struct notifier_block *this, unsigned long event, | |||
1521 | { | 1521 | { |
1522 | struct net_device *dev = ptr; | 1522 | struct net_device *dev = ptr; |
1523 | struct net *net = dev_net(dev); | 1523 | struct net *net = dev_net(dev); |
1524 | struct netns_ipvs *ipvs = net_ipvs(net); | ||
1524 | struct ip_vs_service *svc; | 1525 | struct ip_vs_service *svc; |
1525 | struct ip_vs_dest *dest; | 1526 | struct ip_vs_dest *dest; |
1526 | unsigned int idx; | 1527 | unsigned int idx; |
1527 | 1528 | ||
1528 | if (event != NETDEV_UNREGISTER) | 1529 | if (event != NETDEV_UNREGISTER || !ipvs) |
1529 | return NOTIFY_DONE; | 1530 | return NOTIFY_DONE; |
1530 | IP_VS_DBG(3, "%s() dev=%s\n", __func__, dev->name); | 1531 | IP_VS_DBG(3, "%s() dev=%s\n", __func__, dev->name); |
1531 | EnterFunction(2); | 1532 | EnterFunction(2); |
@@ -1551,7 +1552,7 @@ static int ip_vs_dst_event(struct notifier_block *this, unsigned long event, | |||
1551 | } | 1552 | } |
1552 | } | 1553 | } |
1553 | 1554 | ||
1554 | list_for_each_entry(dest, &net_ipvs(net)->dest_trash, n_list) { | 1555 | list_for_each_entry(dest, &ipvs->dest_trash, n_list) { |
1555 | __ip_vs_dev_reset(dest, dev); | 1556 | __ip_vs_dev_reset(dest, dev); |
1556 | } | 1557 | } |
1557 | mutex_unlock(&__ip_vs_mutex); | 1558 | mutex_unlock(&__ip_vs_mutex); |