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 <samuel.thibault@ens-lyon.org>
This commit is contained in:
Samuel Thibault 2020-07-19 13:43:39 +02:00 committed by Yafei Jin
parent f4740481ad
commit 8d1870b1b4

View File

@ -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);
}