aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/addrconf.c')
-rw-r--r--net/ipv6/addrconf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 4ea8cf7c0cc4..e717a034c953 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -634,8 +634,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
634 } 634 }
635#endif 635#endif
636 636
637 for (ifap = &idev->addr_list; (ifa=*ifap) != NULL; 637 for (ifap = &idev->addr_list; (ifa=*ifap) != NULL;) {
638 ifap = &ifa->if_next) {
639 if (ifa == ifp) { 638 if (ifa == ifp) {
640 *ifap = ifa->if_next; 639 *ifap = ifa->if_next;
641 __in6_ifa_put(ifp); 640 __in6_ifa_put(ifp);
@@ -643,6 +642,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
643 if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0) 642 if (!(ifp->flags & IFA_F_PERMANENT) || onlink > 0)
644 break; 643 break;
645 deleted = 1; 644 deleted = 1;
645 continue;
646 } else if (ifp->flags & IFA_F_PERMANENT) { 646 } else if (ifp->flags & IFA_F_PERMANENT) {
647 if (ipv6_prefix_equal(&ifa->addr, &ifp->addr, 647 if (ipv6_prefix_equal(&ifa->addr, &ifp->addr,
648 ifp->prefix_len)) { 648 ifp->prefix_len)) {
@@ -666,6 +666,7 @@ static void ipv6_del_addr(struct inet6_ifaddr *ifp)
666 } 666 }
667 } 667 }
668 } 668 }
669 ifap = &ifa->if_next;
669 } 670 }
670 write_unlock_bh(&idev->lock); 671 write_unlock_bh(&idev->lock);
671 672