Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187927
b: refs/heads/master
c: 8f37ada
h: refs/heads/master
i:
  187925: 384ff04
  187923: c2f9b80
  187919: bef795d
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed Mar 4, 2010
1 parent d8ddaba commit a9cfb25
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 84e8b803f1e16f3a2b8b80f80a63fa2f2f8a9be6
refs/heads/master: 8f37ada5b5f6bfb4d251a7f510f249cb855b77b3
18 changes: 13 additions & 5 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2615,7 +2615,7 @@ static void addrconf_bonding_change(struct net_device *dev, unsigned long event)
static int addrconf_ifdown(struct net_device *dev, int how)
{
struct inet6_dev *idev;
struct inet6_ifaddr *ifa, **bifa;
struct inet6_ifaddr *ifa, *keep_list, **bifa;
struct net *net = dev_net(dev);
int i;

Expand Down Expand Up @@ -2689,15 +2689,22 @@ static int addrconf_ifdown(struct net_device *dev, int how)
write_lock_bh(&idev->lock);
}
#endif
bifa = &idev->addr_list;
while ((ifa = *bifa) != NULL) {
keep_list = NULL;
bifa = &keep_list;
while ((ifa = idev->addr_list) != NULL) {
idev->addr_list = ifa->if_next;
ifa->if_next = NULL;

addrconf_del_timer(ifa);

/* If just doing link down, and address is permanent
and not link-local, then retain it. */
if (how == 0 &&
(ifa->flags&IFA_F_PERMANENT) &&
!(ipv6_addr_type(&ifa->addr) & IPV6_ADDR_LINKLOCAL)) {

/* Move to holding list */
*bifa = ifa;
bifa = &ifa->if_next;

/* If not doing DAD on this address, just keep it. */
Expand All @@ -2714,8 +2721,6 @@ static int addrconf_ifdown(struct net_device *dev, int how)
ifa->flags |= IFA_F_TENTATIVE;
in6_ifa_hold(ifa);
} else {
*bifa = ifa->if_next;
ifa->if_next = NULL;
ifa->dead = 1;
}
write_unlock_bh(&idev->lock);
Expand All @@ -2726,6 +2731,9 @@ static int addrconf_ifdown(struct net_device *dev, int how)

write_lock_bh(&idev->lock);
}

idev->addr_list = keep_list;

write_unlock_bh(&idev->lock);

/* Step 5: Discard multicast list */
Expand Down

0 comments on commit a9cfb25

Please sign in to comment.