DORMANTno replies

[PATCH] [IPv6] Do not update all temporary address, only the one with the same prefix

From: Benoit Boissinot <hidden>
Date: 2008-03-18 12:47:41
Subsystem: networking [general], networking [ipv4/ipv6], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, David Ahern, Ido Schimmel, Linus Torvalds

Only the temporary address with the same prefix should be updated

Signed-off-by: Benoit Boissinot <redacted>

---
I was wondering why my temporary address would always become deprecated,
the reason was that my ISP is advertizing two prefixes, one is with
preferred lifetime = 0, the other isn't.
As soon as an RA came, it updated the lifetime of both adresses to 0.

The check for the prefix_len isn't necessary since it should always be 64,
maybe it could be removed, I don't know
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 101e0e7..5d0e404 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1831,6 +1848,10 @@ ok:
                                 * lifetimes of an existing temporary address
                                 * when processing a Prefix Information Option.
                                 */
+                               if (ift->prefix_len != ifp->prefix_len ||
+                                   !ipv6_prefix_equal(&ift->addr, &ifp->addr, ifp->prefix_len))
+                                       continue;
+
                                spin_lock(&ift->lock);
                                flags = ift->flags;
                                if (ift->valid_lft > valid_lft &&

-- 
:wq
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help