From f209ccfbaf5165c91bb04a5fdec83b3037b2f21e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Pali=20Roh=C3=A1r?= Date: Sat, 9 Jan 2021 14:40:12 +0100 Subject: [PATCH] ipv6cp: Fix clearing previous IPv6 LL address in demand mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- pppd/ipv6cp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- 2.39.2