Send connman mailing list submissions to
[email protected]
To subscribe or unsubscribe via email, send a message with subject or
body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."
Today's Topics:
1. Re: [PATCH] l2tp: Remove use of lock option for pppd
(Jussi Laakkonen)
2. [PATCH v2] l2tp: Add default value for 'ipsec saref' to be able to use
'lock' with pppd
(Jussi Laakkonen)
3. [PATCH v2] l2tp: Save 'exclusive' config value in lns default context
(Jussi Laakkonen)
4. Is there anyway to get SIM ID? (JH)
----------------------------------------------------------------------
Date: Wed, 30 Oct 2019 11:30:14 +0200
From: Jussi Laakkonen <[email protected]>
Subject: Re: [PATCH] l2tp: Remove use of lock option for pppd
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8; format=flowed
On 10/29/19 10:31 AM, Jussi Laakkonen wrote:
> Hi Daniel,
>
> Please ignore this commit. I must have hit some odd bug with pppd such
> as was reported in https://github.com/xelerance/xl2tpd/issues/108 - not
> sure why or how but the problem with the "lock" option disappeared.
>
> BR,
> Jussi
>
> On 10/24/19 11:14 AM, Jussi Laakkonen wrote:
>> Connection with L2TP plugin cannot be established if the "lock" option
>> is used. When running xl2tpd in terminal with the file content created
>> by the plugin following is reported and connection fails:
>>
>> xl2tpd -D -C control -c connman-xl2tpd.conf
...
>> /usr/sbin/pppd: In file /path/to/l2tp/connman-ppp-option.conf:
>> unrecognized option 'lock'
This is actually caused by the absence of "ipsec saref" in [global]
section of xl2tpd config file. Apparently that option must be set,
regardless of its value (yes|no), in order to accept the "lock" option
in ppp config for pppd. Did not see this in any of the documentations.
This issue seems to happen also with latest xl2tpd (1.3.15).
Problem did not persist anymore if "ipsec saref" had some value set in
the VPN setings, so the issue existed on new/unedited VPN connections.
I'll send a patch for this today as V2.
BR,
Jussi
------------------------------
Date: Wed, 30 Oct 2019 11:54:51 +0200
From: Jussi Laakkonen <[email protected]>
Subject: [PATCH v2] l2tp: Add default value for 'ipsec saref' to be
able to use 'lock' with pppd
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
The absence of option 'ipsec saref' in xl2tpd config file will cause the
following error to stop pppd:
xl2tpd -D -C control -c connman-xl2tpd.conf
xl2tpd[17773]: setsockopt recvref[30]: Protocol not available
xl2tpd[17773]: Using l2tp kernel support.
xl2tpd[17773]: xl2tpd version xl2tpd-1.3.8 started on Sailfish PID:17773
xl2tpd[17773]: Written by Mark Spencer, Copyright (C) 1998, Adtran, Inc.
xl2tpd[17773]: Forked by Scott Balmos and David Stipp, (C) 2001
xl2tpd[17773]: Inherited by Jeff McAdams, (C) 2002
xl2tpd[17773]: Forked again by Xelerance (www.xelerance.com) (C) 2006-2016
xl2tpd[17773]: Listening on IP address a.b.c.d, port 32000
xl2tpd[17773]: Connecting to host w.x.y.z, port 1701
xl2tpd[17773]: Connection established to w.x.y.z, 1701. Local: 18554, Remote:
20429 (ref=0/0).
xl2tpd[17773]: Calling on tunnel 18554
xl2tpd[17773]: Call established with w.x.y.z, Local: 42029, Remote: 24137,
Serial: 1 (ref=0/0)
xl2tpd[17773]: start_pppd: I'm running:
xl2tpd[17773]: "/usr/sbin/pppd"
xl2tpd[17773]: "plugin"
xl2tpd[17773]: "pppol2tp.so"
xl2tpd[17773]: "pppol2tp"
xl2tpd[17773]: "7"
xl2tpd[17773]: "passive"
xl2tpd[17773]: "nodetach"
xl2tpd[17773]: ":" §
xl2tpd[17773]: "name"
xl2tpd[17773]: "user"
xl2tpd[17773]: "file"
xl2tpd[17773]: "/path/to/l2tp/connman-ppp-option.conf"
/usr/sbin/pppd: In file /path/to/l2tp/connman-ppp-option.conf: unrecognized
option 'lock'
xl2tpd[17773]: child_handler : pppd exited for call 24137 with code 2
xl2tpd[17773]: call_close: Call 42029 to w.x.y.z disconnected
xl2tpd[17773]: write_packet: tty is not open yet.
xl2tpd[17773]: Terminating pppd: sending TERM signal to pid 17774
xl2tpd[17773]: get_call: can't find call 42029 in tunnel 18554
(ref=0/0)xl2tpd[17773]: get_call: can't find call 42029 in tunnel 18554
By adding a default value for 'ipsec saref' connection can be
established also with new or unedited L2TP VPN connection. This was
tested with PPP (from commit 8e77984ac5d7acbe68b2b2f590abd17564c9730d)
and xl2tpd versions 1.3.8 + 1.3.15.
---
Changes since V2:
* The 'lock' option should not be removed, even though it was the
option pppd complained about.
vpn/plugins/l2tp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c
index 011f64bb..e0783bbd 100644
--- a/vpn/plugins/l2tp.c
+++ b/vpn/plugins/l2tp.c
@@ -97,7 +97,7 @@ struct {
{ "L2TP.ForceUserSpace", "force userspace", OPT_L2G, NULL, OPT_STRING },
{ "L2TP.ListenAddr", "listen-addr", OPT_L2G, NULL, OPT_STRING },
{ "L2TP.Rand Source", "rand source", OPT_L2G, NULL, OPT_STRING },
- { "L2TP.IPsecSaref", "ipsec saref", OPT_L2G, NULL, OPT_STRING },
+ { "L2TP.IPsecSaref", "ipsec saref", OPT_L2G, "no", OPT_STRING },
{ "L2TP.Port", "port", OPT_L2G, NULL, OPT_STRING },
{ "PPPD.EchoFailure", "lcp-echo-failure", OPT_PPPD, "0", OPT_STRING },
{ "PPPD.EchoInterval", "lcp-echo-interval", OPT_PPPD, "0", OPT_STRING },
--
2.20.1
------------------------------
Date: Wed, 30 Oct 2019 16:54:39 +0200
From: Jussi Laakkonen <[email protected]>
Subject: [PATCH v2] l2tp: Save 'exclusive' config value in lns default
context
To: [email protected]
Message-ID: <[email protected]>
The config value 'exclusive' must be saved in lns default context. This
is because if written to lac context parsing will fail (versions 1.3.8
and 1.3.14 were tested):
xl2tpd[]: parse_config: line 12: 'exclusive' not valid in this context
This went undetected unless the option was set. By default, 'exclusive'
is not written to xl2tpd config. The xl2tpd documentation states that
"Most of those described in the LNS section may be used in a LAC
context, where it make common sense (essentially l2tp procotols tuning
flags and authentication / ppp related ones)."
Added a enum option OPT_L2LNS for defining other options to be used in
lns context only.
---
Changes since V2:
* Use [lns default] as context. This is not explicitly stated on the
xl2tpd man pages but many config file examples and
https://github.com/xelerance/xl2tpd/blob/master/file.c#L1394 suggests
that the context name should be defined, and with default the setting
is applied for all.
vpn/plugins/l2tp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c
index ff5f08b9..f9089276 100644
--- a/vpn/plugins/l2tp.c
+++ b/vpn/plugins/l2tp.c
@@ -65,6 +65,7 @@ enum {
OPT_L2G = 2,
OPT_L2 = 3,
OPT_PPPD = 4,
+ OPT_L2LNS = 5,
};
struct {
@@ -83,7 +84,7 @@ struct {
{ "L2TP.DefaultRoute", "defaultroute", OPT_L2, NULL, OPT_STRING },
{ "L2TP.FlowBit", "flow bit", OPT_L2, NULL, OPT_STRING },
{ "L2TP.TunnelRWS", "tunnel rws", OPT_L2, NULL, OPT_STRING },
- { "L2TP.Exclusive", "exclusive", OPT_L2, NULL, OPT_STRING },
+ { "L2TP.Exclusive", "exclusive", OPT_L2LNS, NULL, OPT_STRING },
{ "L2TP.Autodial", "autodial", OPT_L2, "yes", OPT_STRING },
{ "L2TP.Redial", "redial", OPT_L2, "yes", OPT_STRING },
{ "L2TP.RedialTimeout", "redial timeout", OPT_L2, "10", OPT_STRING },
@@ -454,6 +455,9 @@ static int l2tp_write_config(struct vpn_provider *provider,
l2tp_write_option(fd, "[global]", NULL);
l2tp_write_fields(provider, fd, OPT_L2G);
+ l2tp_write_option(fd, "[lns default]", NULL);
+ l2tp_write_fields(provider, fd, OPT_L2LNS);
+
l2tp_write_option(fd, "[lac l2tp]", NULL);
option = vpn_provider_get_string(provider, "Host");
--
2.20.1
------------------------------
Date: Thu, 31 Oct 2019 15:31:30 +1100
From: JH <[email protected]>
Subject: Is there anyway to get SIM ID?
To: connman <[email protected]>
Message-ID:
<CAA=hcwsmkc1bfxocjytids0onog+ypbqs3ics3ur4+mtyor...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"
Hi,
I am running connman in a 4G LTE device in Linux system, are there
anyway to get SIM ID? and the Operator and LTE signalling strength?
Unfoutuantly, I don't have connmanctl due to the limitation of the
space to install Python.
Thank you.
Kind regards,
- jh
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of connman Digest, Vol 48, Issue 34
***************************************