]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/ipv6cp.c
Enable IPv6 by default (#171)
[ppp.git] / pppd / ipv6cp.c
index 47e34229e0cdff4b044200a5c28fc4a33f868cc3..c01b84639e674246224812914afb13c29b3deb5a 100644 (file)
@@ -245,6 +245,8 @@ static option_t ipv6cp_option_list[] = {
 
     { "ipv6cp-accept-local", o_bool, &ipv6cp_allowoptions[0].accept_local,
       "Accept peer's interface identifier for us", 1 },
+    { "ipv6cp-accept-remote", o_bool, &ipv6cp_allowoptions[0].accept_remote,
+      "Accept peer's interface identifier for itself", 1 },
 
     { "defaultroute6", o_bool, &ipv6cp_wantoptions[0].default_route,
       "Add default IPv6 route", OPT_ENABLE|1, &ipv6cp_allowoptions[0].default_route },
@@ -301,7 +303,7 @@ struct protent ipv6cp_protent = {
     ipv6cp_close,
     ipv6cp_printpkt,
     NULL,
-    0,
+    1,
     "IPV6CP",
     "IPV6",
     ipv6cp_option_list,
@@ -444,6 +446,7 @@ ipv6cp_init(unit)
     memset(ao, 0, sizeof(*ao));
 
     wo->accept_local = 0;
+    wo->accept_remote = 0;
     wo->neg_ifaceid = 1;
     ao->neg_ifaceid = 1;
 
@@ -547,6 +550,8 @@ ipv6cp_resetci(f)
        wo->accept_local = 1;
        eui64_magic_nz(wo->ourid);
     }
+    if (!wo->opt_remote)
+       wo->accept_remote = 1;
     
     *go = *wo;
     eui64_zero(go->hisid);     /* last proposed interface identifier */
@@ -974,7 +979,7 @@ ipv6cp_reqci(f, inp, len, reject_if_disagree)
                orc = CONFREJ;          /* Reject CI */
                break;
            }
-           if (!eui64_iszero(wo->hisid) && 
+           if (!eui64_iszero(wo->hisid) && !wo->accept_remote &&
                !eui64_equals(ifaceid, wo->hisid) && 
                eui64_iszero(go->hisid)) {