Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184021
b: refs/heads/master
c: 21809fa
h: refs/heads/master
i:
  184019: 05a1ab9
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed Feb 12, 2010
1 parent 8b111ed commit 6ef78c8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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: dc2b99f71ef477a31020511876ab4403fb7c4420
refs/heads/master: 21809fafa042fcfff3f788419bed99f3c289745c
21 changes: 11 additions & 10 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2802,22 +2802,22 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
read_lock_bh(&idev->lock);
if (ifp->dead)
goto out;
spin_lock_bh(&ifp->lock);

spin_lock(&ifp->lock);
if (dev->flags&(IFF_NOARP|IFF_LOOPBACK) ||
idev->cnf.accept_dad < 1 ||
!(ifp->flags&IFA_F_TENTATIVE) ||
ifp->flags & IFA_F_NODAD) {
ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
spin_unlock_bh(&ifp->lock);
spin_unlock(&ifp->lock);
read_unlock_bh(&idev->lock);

addrconf_dad_completed(ifp);
return;
}

if (!(idev->if_flags & IF_READY)) {
spin_unlock_bh(&ifp->lock);
spin_unlock(&ifp->lock);
read_unlock_bh(&idev->lock);
/*
* If the device is not ready:
Expand All @@ -2837,7 +2837,7 @@ static void addrconf_dad_start(struct inet6_ifaddr *ifp, u32 flags)
ip6_ins_rt(ifp->rt);

addrconf_dad_kick(ifp);
spin_unlock_bh(&ifp->lock);
spin_unlock(&ifp->lock);
out:
read_unlock_bh(&idev->lock);
}
Expand All @@ -2853,14 +2853,15 @@ static void addrconf_dad_timer(unsigned long data)
read_unlock_bh(&idev->lock);
goto out;
}
spin_lock_bh(&ifp->lock);

spin_lock(&ifp->lock);
if (ifp->probes == 0) {
/*
* DAD was successful
*/

ifp->flags &= ~(IFA_F_TENTATIVE|IFA_F_OPTIMISTIC|IFA_F_DADFAILED);
spin_unlock_bh(&ifp->lock);
spin_unlock(&ifp->lock);
read_unlock_bh(&idev->lock);

addrconf_dad_completed(ifp);
Expand All @@ -2870,7 +2871,7 @@ static void addrconf_dad_timer(unsigned long data)

ifp->probes--;
addrconf_mod_timer(ifp, AC_DAD, ifp->idev->nd_parms->retrans_time);
spin_unlock_bh(&ifp->lock);
spin_unlock(&ifp->lock);
read_unlock_bh(&idev->lock);

/* send a neighbour solicitation for our addr */
Expand Down Expand Up @@ -2918,12 +2919,12 @@ static void addrconf_dad_run(struct inet6_dev *idev) {

read_lock_bh(&idev->lock);
for (ifp = idev->addr_list; ifp; ifp = ifp->if_next) {
spin_lock_bh(&ifp->lock);
spin_lock(&ifp->lock);
if (!(ifp->flags & IFA_F_TENTATIVE)) {
spin_unlock_bh(&ifp->lock);
spin_unlock(&ifp->lock);
continue;
}
spin_unlock_bh(&ifp->lock);
spin_unlock(&ifp->lock);
addrconf_dad_kick(ifp);
}
read_unlock_bh(&idev->lock);
Expand Down

0 comments on commit 6ef78c8

Please sign in to comment.