|
@@ -2929,21 +2929,6 @@ void xfrm_policy_unregister_afinfo(const struct xfrm_policy_afinfo *afinfo)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(xfrm_policy_unregister_afinfo);
|
|
EXPORT_SYMBOL(xfrm_policy_unregister_afinfo);
|
|
|
|
|
|
-static int xfrm_dev_event(struct notifier_block *this, unsigned long event, void *ptr)
|
|
|
|
-{
|
|
|
|
- struct net_device *dev = netdev_notifier_info_to_dev(ptr);
|
|
|
|
-
|
|
|
|
- switch (event) {
|
|
|
|
- case NETDEV_DOWN:
|
|
|
|
- xfrm_garbage_collect(dev_net(dev));
|
|
|
|
- }
|
|
|
|
- return NOTIFY_DONE;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-static struct notifier_block xfrm_dev_notifier = {
|
|
|
|
- .notifier_call = xfrm_dev_event,
|
|
|
|
-};
|
|
|
|
-
|
|
|
|
#ifdef CONFIG_XFRM_STATISTICS
|
|
#ifdef CONFIG_XFRM_STATISTICS
|
|
static int __net_init xfrm_statistics_init(struct net *net)
|
|
static int __net_init xfrm_statistics_init(struct net *net)
|
|
{
|
|
{
|
|
@@ -3020,7 +3005,7 @@ static int __net_init xfrm_policy_init(struct net *net)
|
|
INIT_WORK(&net->xfrm.policy_hash_work, xfrm_hash_resize);
|
|
INIT_WORK(&net->xfrm.policy_hash_work, xfrm_hash_resize);
|
|
INIT_WORK(&net->xfrm.policy_hthresh.work, xfrm_hash_rebuild);
|
|
INIT_WORK(&net->xfrm.policy_hthresh.work, xfrm_hash_rebuild);
|
|
if (net_eq(net, &init_net))
|
|
if (net_eq(net, &init_net))
|
|
- register_netdevice_notifier(&xfrm_dev_notifier);
|
|
|
|
|
|
+ xfrm_dev_init();
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
out_bydst:
|
|
out_bydst:
|