Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154991
b: refs/heads/master
c: a1ed052
h: refs/heads/master
i:
  154989: 98daac9
  154987: 3ffc272
  154983: 8dc10b3
  154975: 89e698f
v: v3
  • Loading branch information
Brian Haley authored and David S. Miller committed Jul 4, 2009
1 parent 583bc60 commit f7cfb62
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 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: 59cae0092e4da753b5a2adb32933e0d1b223bcc5
refs/heads/master: a1ed05263b74921742b454ef52c30b609ec6940f
30 changes: 27 additions & 3 deletions trunk/net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -1916,8 +1916,32 @@ void addrconf_prefix_rcv(struct net_device *dev, u8 *opt, int len)
update_lft = 1;
else if (stored_lft <= MIN_VALID_LIFETIME) {
/* valid_lft <= stored_lft is always true */
/* XXX: IPsec */
update_lft = 0;
/*
* RFC 4862 Section 5.5.3e:
* "Note that the preferred lifetime of
* the corresponding address is always
* reset to the Preferred Lifetime in
* the received Prefix Information
* option, regardless of whether the
* valid lifetime is also reset or
* ignored."
*
* So if the preferred lifetime in
* this advertisement is different
* than what we have stored, but the
* valid lifetime is invalid, just
* reset prefered_lft.
*
* We must set the valid lifetime
* to the stored lifetime since we'll
* be updating the timestamp below,
* else we'll set it back to the
* minumum.
*/
if (prefered_lft != ifp->prefered_lft) {
valid_lft = stored_lft;
update_lft = 1;
}
} else {
valid_lft = MIN_VALID_LIFETIME;
if (valid_lft < prefered_lft)
Expand Down Expand Up @@ -3085,7 +3109,7 @@ static void addrconf_verify(unsigned long foo)
spin_unlock(&ifp->lock);
continue;
} else if (age >= ifp->prefered_lft) {
/* jiffies - ifp->tsamp > age >= ifp->prefered_lft */
/* jiffies - ifp->tstamp > age >= ifp->prefered_lft */
int deprecate = 0;

if (!(ifp->flags&IFA_F_DEPRECATED)) {
Expand Down

0 comments on commit f7cfb62

Please sign in to comment.