Skip to contentSkip to conversation

Do not update all temporary address, only the one with the same prefix

PATCH New Benoit Boissinot 1 participant 1 message Mar 18, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Do not update all temporary address, only the one with the same prefix

Only the temporary address with the same prefix should be updated

---
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

net/ipv6/addrconf.c +4 -0
index 101e0e7..5d0e404 100644
@@ -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 &&
Signature · 1 line
:wq