Commit 2d43f325 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[SCTP]: Fix inetaddr notifier chain corruption

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5a5246bb
......@@ -78,7 +78,10 @@
#include <asm/uaccess.h>
extern struct notifier_block sctp_inetaddr_notifier;
extern int sctp_inetaddr_event(struct notifier_block *, unsigned long, void *);
static struct notifier_block sctp_inet6addr_notifier = {
.notifier_call = sctp_inetaddr_event,
};
/* ICMP error handler. */
void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
......@@ -983,7 +986,7 @@ int sctp_v6_init(void)
sctp_register_af(&sctp_ipv6_specific);
/* Register notifier for inet6 address additions/deletions. */
register_inet6addr_notifier(&sctp_inetaddr_notifier);
register_inet6addr_notifier(&sctp_inet6addr_notifier);
rc = 0;
out:
return rc;
......@@ -999,6 +1002,6 @@ void sctp_v6_exit(void)
inet6_del_protocol(&sctpv6_protocol, IPPROTO_SCTP);
inet6_unregister_protosw(&sctpv6_seqpacket_protosw);
inet6_unregister_protosw(&sctpv6_stream_protosw);
unregister_inet6addr_notifier(&sctp_inetaddr_notifier);
unregister_inet6addr_notifier(&sctp_inet6addr_notifier);
sk_free_slab(&sctpv6_prot);
}
......@@ -622,8 +622,8 @@ static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
/* Event handler for inet address addition/deletion events.
* Basically, whenever there is an event, we re-build our local address list.
*/
static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
void *ptr)
int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
void *ptr)
{
unsigned long flags;
......@@ -824,7 +824,7 @@ static struct sctp_pf sctp_pf_inet = {
};
/* Notifier for inetaddr addition/deletion events. */
struct notifier_block sctp_inetaddr_notifier = {
static struct notifier_block sctp_inetaddr_notifier = {
.notifier_call = sctp_inetaddr_event,
};
......
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