]> git.ozlabs.org Git - ppp.git/commitdiff
pppd: Fix the default value for ipv6cp-accept-local to false
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 19 Jul 2020 11:43:39 +0000 (13:43 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 19 Jul 2020 11:55:55 +0000 (13:55 +0200)
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>
pppd/ipv6cp.c

index bda91e90afb0b38ca303c666393deec19756e223..47e34229e0cdff4b044200a5c28fc4a33f868cc3 100644 (file)
@@ -443,7 +443,7 @@ ipv6cp_init(unit)
     memset(wo, 0, sizeof(*wo));
     memset(ao, 0, sizeof(*ao));
 
-    wo->accept_local = 1;
+    wo->accept_local = 0;
     wo->neg_ifaceid = 1;
     ao->neg_ifaceid = 1;
 
@@ -544,6 +544,7 @@ ipv6cp_resetci(f)
     wo->req_ifaceid = wo->neg_ifaceid && ipv6cp_allowoptions[f->unit].neg_ifaceid;
     
     if (!wo->opt_local) {
+       wo->accept_local = 1;
        eui64_magic_nz(wo->ourid);
     }