diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/core/fib_rules.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/core/fib_rules.c b/net/core/fib_rules.c index 79de3b14a8d1..32b3a0152d7a 100644 --- a/net/core/fib_rules.c +++ b/net/core/fib_rules.c | |||
@@ -664,17 +664,18 @@ static int __init fib_rules_init(void) | |||
664 | rtnl_register(PF_UNSPEC, RTM_DELRULE, fib_nl_delrule, NULL); | 664 | rtnl_register(PF_UNSPEC, RTM_DELRULE, fib_nl_delrule, NULL); |
665 | rtnl_register(PF_UNSPEC, RTM_GETRULE, NULL, fib_nl_dumprule); | 665 | rtnl_register(PF_UNSPEC, RTM_GETRULE, NULL, fib_nl_dumprule); |
666 | 666 | ||
667 | err = register_netdevice_notifier(&fib_rules_notifier); | 667 | err = register_pernet_subsys(&fib_rules_net_ops); |
668 | if (err < 0) | 668 | if (err < 0) |
669 | goto fail; | 669 | goto fail; |
670 | 670 | ||
671 | err = register_pernet_subsys(&fib_rules_net_ops); | 671 | err = register_netdevice_notifier(&fib_rules_notifier); |
672 | if (err < 0) | 672 | if (err < 0) |
673 | goto fail_unregister; | 673 | goto fail_unregister; |
674 | |||
674 | return 0; | 675 | return 0; |
675 | 676 | ||
676 | fail_unregister: | 677 | fail_unregister: |
677 | unregister_netdevice_notifier(&fib_rules_notifier); | 678 | unregister_pernet_subsys(&fib_rules_net_ops); |
678 | fail: | 679 | fail: |
679 | rtnl_unregister(PF_UNSPEC, RTM_NEWRULE); | 680 | rtnl_unregister(PF_UNSPEC, RTM_NEWRULE); |
680 | rtnl_unregister(PF_UNSPEC, RTM_DELRULE); | 681 | rtnl_unregister(PF_UNSPEC, RTM_DELRULE); |