|
@@ -1521,11 +1521,12 @@ static int ip_vs_dst_event(struct notifier_block *this, unsigned long event,
|
|
{
|
|
{
|
|
struct net_device *dev = ptr;
|
|
struct net_device *dev = ptr;
|
|
struct net *net = dev_net(dev);
|
|
struct net *net = dev_net(dev);
|
|
|
|
+ struct netns_ipvs *ipvs = net_ipvs(net);
|
|
struct ip_vs_service *svc;
|
|
struct ip_vs_service *svc;
|
|
struct ip_vs_dest *dest;
|
|
struct ip_vs_dest *dest;
|
|
unsigned int idx;
|
|
unsigned int idx;
|
|
|
|
|
|
- if (event != NETDEV_UNREGISTER)
|
|
|
|
|
|
+ if (event != NETDEV_UNREGISTER || !ipvs)
|
|
return NOTIFY_DONE;
|
|
return NOTIFY_DONE;
|
|
IP_VS_DBG(3, "%s() dev=%s\n", __func__, dev->name);
|
|
IP_VS_DBG(3, "%s() dev=%s\n", __func__, dev->name);
|
|
EnterFunction(2);
|
|
EnterFunction(2);
|
|
@@ -1551,7 +1552,7 @@ static int ip_vs_dst_event(struct notifier_block *this, unsigned long event,
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- list_for_each_entry(dest, &net_ipvs(net)->dest_trash, n_list) {
|
|
|
|
|
|
+ list_for_each_entry(dest, &ipvs->dest_trash, n_list) {
|
|
__ip_vs_dev_reset(dest, dev);
|
|
__ip_vs_dev_reset(dest, dev);
|
|
}
|
|
}
|
|
mutex_unlock(&__ip_vs_mutex);
|
|
mutex_unlock(&__ip_vs_mutex);
|