Commit 8051ff93 authored by Sridhar Samudrala's avatar Sridhar Samudrala Committed by Sridhar Samudrala

[SCTP] Move the registration of v6 address event notifier to ipv6.c.

parent 7741c391
...@@ -76,6 +76,8 @@ ...@@ -76,6 +76,8 @@
#include <asm/uaccess.h> #include <asm/uaccess.h>
extern struct notifier_block sctp_inetaddr_notifier;
/* FIXME: This macro needs to be moved to a common header file. */ /* FIXME: This macro needs to be moved to a common header file. */
#define NIP6(addr) \ #define NIP6(addr) \
ntohs((addr)->s6_addr16[0]), \ ntohs((addr)->s6_addr16[0]), \
...@@ -570,6 +572,9 @@ int sctp_v6_init(void) ...@@ -570,6 +572,9 @@ int sctp_v6_init(void)
/* Register the SCTP specfic AF_INET6 functions. */ /* Register the SCTP specfic AF_INET6 functions. */
sctp_register_af(&sctp_ipv6_specific); sctp_register_af(&sctp_ipv6_specific);
/* Register notifier for inet6 address additions/deletions. */
register_inet6addr_notifier(&sctp_inetaddr_notifier);
return 0; return 0;
} }
...@@ -579,4 +584,5 @@ void sctp_v6_exit(void) ...@@ -579,4 +584,5 @@ void sctp_v6_exit(void)
list_del(&sctp_ipv6_specific.list); list_del(&sctp_ipv6_specific.list);
inet6_del_protocol(&sctpv6_protocol, IPPROTO_SCTP); inet6_del_protocol(&sctpv6_protocol, IPPROTO_SCTP);
inet6_unregister_protosw(&sctpv6_protosw); inet6_unregister_protosw(&sctpv6_protosw);
unregister_inet6addr_notifier(&sctp_inetaddr_notifier);
} }
...@@ -785,9 +785,8 @@ int sctp_init(void) ...@@ -785,9 +785,8 @@ int sctp_init(void)
INIT_LIST_HEAD(&sctp_proto.local_addr_list); INIT_LIST_HEAD(&sctp_proto.local_addr_list);
sctp_proto.local_addr_lock = SPIN_LOCK_UNLOCKED; sctp_proto.local_addr_lock = SPIN_LOCK_UNLOCKED;
/* Register notifiers for inet and inet6 address events. */ /* Register notifier for inet address additions/deletions. */
register_inetaddr_notifier(&sctp_inetaddr_notifier); register_inetaddr_notifier(&sctp_inetaddr_notifier);
register_inet6addr_notifier(&sctp_inetaddr_notifier);
sctp_get_local_addr_list(&sctp_proto); sctp_get_local_addr_list(&sctp_proto);
...@@ -818,9 +817,8 @@ void sctp_exit(void) ...@@ -818,9 +817,8 @@ void sctp_exit(void)
* up all the remaining associations and all that memory. * up all the remaining associations and all that memory.
*/ */
/* Unregister notifiers for inet and inet6 address events. */ /* Unregister notifier for inet address additions/deletions. */
unregister_inetaddr_notifier(&sctp_inetaddr_notifier); unregister_inetaddr_notifier(&sctp_inetaddr_notifier);
unregister_inet6addr_notifier(&sctp_inetaddr_notifier);
/* Free the local address list. */ /* Free the local address list. */
sctp_free_local_addr_list(&sctp_proto); sctp_free_local_addr_list(&sctp_proto);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment