aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/igmp.c
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2014-01-10 19:09:45 -0500
committerDavid S. Miller <davem@davemloft.net>2014-01-14 18:03:33 -0500
commit72c1d3bdd5bf10a789608336ba0d61f1e44e4350 (patch)
tree92f31ffd05e582d17bb8e9e2a857750a52118a72 /net/ipv4/igmp.c
parentc49fa0166391279249483d61511c358580e29ee4 (diff)
ipv4: register igmp_notifier even when !CONFIG_PROC_FS
We still need this notifier even when we don't config PROC_FS. It should be rare to have a kernel without PROC_FS, so just for completeness. Cc: Stephen Hemminger <stephen@networkplumber.org> Cc: David S. Miller <davem@davemloft.net> Cc: Patrick McHardy <kaber@trash.net> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/igmp.c')
-rw-r--r--net/ipv4/igmp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c
index 84c4329cbd30..bcbf33e58324 100644
--- a/net/ipv4/igmp.c
+++ b/net/ipv4/igmp.c
@@ -2762,6 +2762,7 @@ static struct pernet_operations igmp_net_ops = {
2762 .init = igmp_net_init, 2762 .init = igmp_net_init,
2763 .exit = igmp_net_exit, 2763 .exit = igmp_net_exit,
2764}; 2764};
2765#endif
2765 2766
2766static int igmp_netdev_event(struct notifier_block *this, 2767static int igmp_netdev_event(struct notifier_block *this,
2767 unsigned long event, void *ptr) 2768 unsigned long event, void *ptr)
@@ -2785,8 +2786,9 @@ static struct notifier_block igmp_notifier = {
2785 .notifier_call = igmp_netdev_event, 2786 .notifier_call = igmp_netdev_event,
2786}; 2787};
2787 2788
2788int __init igmp_mc_proc_init(void) 2789int __init igmp_mc_init(void)
2789{ 2790{
2791#if defined(CONFIG_PROC_FS)
2790 int err; 2792 int err;
2791 2793
2792 err = register_pernet_subsys(&igmp_net_ops); 2794 err = register_pernet_subsys(&igmp_net_ops);
@@ -2800,5 +2802,7 @@ int __init igmp_mc_proc_init(void)
2800reg_notif_fail: 2802reg_notif_fail:
2801 unregister_pernet_subsys(&igmp_net_ops); 2803 unregister_pernet_subsys(&igmp_net_ops);
2802 return err; 2804 return err;
2803} 2805#else
2806 return register_netdevice_notifier(&igmp_notifier);
2804#endif 2807#endif
2808}