From: Pali Rohár Date: Sat, 9 Jan 2021 13:40:12 +0000 (+0100) Subject: ipv6cp: Fix clearing previous IPv6 LL address in demand mode X-Git-Tag: ppp-2.5.0~92^2~1 X-Git-Url: http://git.ozlabs.org/?a=commitdiff_plain;ds=inline;h=f209ccfbaf5165c91bb04a5fdec83b3037b2f21e;p=ppp.git ipv6cp: Fix clearing previous IPv6 LL address in demand mode 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 --- diff --git a/pppd/ipv6cp.c b/pppd/ipv6cp.c index 98b9e95..b166d37 100644 --- a/pppd/ipv6cp.c +++ b/pppd/ipv6cp.c @@ -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)) {