]> git.ozlabs.org Git - ppp.git/commitdiff
ipv6cp: Fix clearing previous IPv6 LL address in demand mode
authorPali Rohár <pali@kernel.org>
Sat, 9 Jan 2021 13:40:12 +0000 (14:40 +0100)
committerPali Rohár <pali@kernel.org>
Sat, 9 Jan 2021 13:40:12 +0000 (14:40 +0100)
Previous old IPv6 LL address is stored in the 'wo' structure. In 'go'/'ho'
is stored new address which needs to be assigned on interface.

Without this patch pppd in demand IPv6 mode always let previous IPv6 LL
address on interface and failed on error:

cif6addr: ioctl(SIOCDIFADDR): No such address

Because it tried to remove new address from interface which obviously was
not set.

Signed-off-by: Pali Rohár <pali@kernel.org>
pppd/ipv6cp.c

index 98b9e95cf21b212d851500d83a02f69010b3038e..b166d376184a62da887c265150669897948f5f62 100644 (file)
@@ -1243,7 +1243,7 @@ ipv6cp_up(fsm *f)
            if (! eui64_equals(ho->hisid, wo->hisid))
                warn("Remote LL address changed to %s", 
                     llv6_ntoa(ho->hisid));
-           ipv6cp_clear_addrs(f->unit, go->ourid, ho->hisid);
+           ipv6cp_clear_addrs(f->unit, wo->ourid, wo->hisid);
 
            /* Set the interface to the new addresses */
            if (!sif6addr(f->unit, go->ourid, ho->hisid)) {