aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/sctp/ipv6.c5
-rw-r--r--net/sctp/protocol.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
index b1e05d719f9b..85f1495e0edc 100644
--- a/net/sctp/ipv6.c
+++ b/net/sctp/ipv6.c
@@ -110,8 +110,9 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev,
110 spin_lock_bh(&sctp_local_addr_lock); 110 spin_lock_bh(&sctp_local_addr_lock);
111 list_for_each_entry_safe(addr, temp, 111 list_for_each_entry_safe(addr, temp,
112 &sctp_local_addr_list, list) { 112 &sctp_local_addr_list, list) {
113 if (ipv6_addr_equal(&addr->a.v6.sin6_addr, 113 if (addr->a.sa.sa_family == AF_INET6 &&
114 &ifa->addr)) { 114 ipv6_addr_equal(&addr->a.v6.sin6_addr,
115 &ifa->addr)) {
115 found = 1; 116 found = 1;
116 addr->valid = 0; 117 addr->valid = 0;
117 list_del_rcu(&addr->list); 118 list_del_rcu(&addr->list);
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index f90091a1b9ce..c2dd65d9f38d 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -647,7 +647,9 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
647 spin_lock_bh(&sctp_local_addr_lock); 647 spin_lock_bh(&sctp_local_addr_lock);
648 list_for_each_entry_safe(addr, temp, 648 list_for_each_entry_safe(addr, temp,
649 &sctp_local_addr_list, list) { 649 &sctp_local_addr_list, list) {
650 if (addr->a.v4.sin_addr.s_addr == ifa->ifa_local) { 650 if (addr->a.sa.sa_family == AF_INET &&
651 addr->a.v4.sin_addr.s_addr ==
652 ifa->ifa_local) {
651 found = 1; 653 found = 1;
652 addr->valid = 0; 654 addr->valid = 0;
653 list_del_rcu(&addr->list); 655 list_del_rcu(&addr->list);