From e2b52c1f1b4e14892fdc5a3bbfb5fec97ce7b9ff Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 19 Jul 2020 13:43:39 +0200 Subject: [PATCH] pppd: Fix the default value for ipv6cp-accept-local to false The ipv6cp-accept-local option was supposed to enable it, but it is already enabled by default, with no way to disable it. For coherency with IPv4 and IPX, this disables ipv6cp-accept-local by default, and the option can be used to enable it. This also enables it automatically when the local id is not specified, in coherency with IPv4 and IPX, and as the documentation was saying. Signed-off-by: Samuel Thibault --- components/network/lwip/src/netif/ppp/ipv6cp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/network/lwip/src/netif/ppp/ipv6cp.c b/components/network/lwip/src/netif/ppp/ipv6cp.c index 11c18df7..b8fc0c5a 100644 --- a/components/network/lwip/src/netif/ppp/ipv6cp.c +++ b/components/network/lwip/src/netif/ppp/ipv6cp.c @@ -440,7 +440,7 @@ static void ipv6cp_init(ppp_pcb *pcb) { memset(ao, 0, sizeof(*ao)); #endif /* 0 */ - wo->accept_local = 1; + wo->accept_local = 0; wo->neg_ifaceid = 1; ao->neg_ifaceid = 1; @@ -515,6 +515,7 @@ static void ipv6cp_resetci(fsm *f) { wo->req_ifaceid = wo->neg_ifaceid && ao->neg_ifaceid; if (!wo->opt_local) { + wo->accept_local = 1; eui64_magic_nz(wo->ourid); }