From 7575f4d1e451a006e4ddd9cc6caa664ce07df83f Mon Sep 17 00:00:00 2001 From: Tore Anderson Date: Fri, 6 Apr 2012 14:09:38 +0200 Subject: [PATCH] mobile: enable IPv6CP This patch lets pppd negotiate IPv6 parameters using IPV6CP. It allows dual-stack mobile broadband to work correctly. Due to the fact that ModemManager hard-codes use of IPv4-only PDP type, the PDP context must manually be defined first using for example AT+CGDCONT=1,"IPV4V6","apn". (ModemManager does not overwrite an already-defined PDP context with the correct APN.) IPV6CP is not considered essential, so when connecting using an IPv4- only PDP context, pppd gives up after a retransmitting a few IPV6CP ConfReqs. The retransmissions happen asynchronously, pppd nor NM waits for them to finish before activating the IPv4 part of the connections. The patch also makes pppd support IPv6-only connections (because IPCP isn't considered essential by pppd either), however NM will currently fail the entire connection if IPCP/IPv4 doesn't succeed. --- src/ppp-manager/nm-ppp-manager.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ppp-manager/nm-ppp-manager.c b/src/ppp-manager/nm-ppp-manager.c index 57ff12d03b..73cc566fab 100644 --- a/src/ppp-manager/nm-ppp-manager.c +++ b/src/ppp-manager/nm-ppp-manager.c @@ -827,6 +827,10 @@ create_pppd_cmd_line (NMPPPManager *self, /* NM handles setting the default route */ nm_cmd_line_add_string (cmd, "nodefaultroute"); + /* Allow IPv6 to be configured by IPV6CP */ + nm_cmd_line_add_string (cmd, "ipv6"); + nm_cmd_line_add_string (cmd, ","); + ppp_debug = !!getenv ("NM_PPP_DEBUG"); if ( nm_logging_level_enabled (LOGL_DEBUG) && nm_logging_domain_enabled (LOGD_PPP))