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: Insights on connmand -d (Daniel Wagner)
2. Re: Does Connman support to connect home WiFi network by WiFi modem WPS
process?
(Daniel Wagner)
3. Re: Is there anyway to get SIM ID? (Daniel Wagner)
4. Re: [PATCH] vpnc: Inform VPN agent about authentication errors
(Daniel Wagner)
5. Re: [PATCH] l2tp: Cancel queued VPN agent msg when disconnected
(Daniel Wagner)
6. Re: [PATCH] l2tp: Inform VPN agent about authentication errors
(Daniel Wagner)
7. Re: [PATCH v2] l2tp: Add default value for 'ipsec saref' to be able to
use 'lock' with pppd
(Daniel Wagner)
8. Re: [PATCH v2] vpnc: Set to use C locale prior to running the task
(Daniel Wagner)
9. Re: [PATCH v2] l2tp: Save 'exclusive' config value in lns default context
(Daniel Wagner)
10. Re: [PATCH] plugins/ethernet: fix strncpy errors with GCC>9.1
(Daniel Wagner)
11. [PATCH v0 0/3] Address a couple of warnings (Daniel Wagner)
----------------------------------------------------------------------
Date: Sat, 2 Nov 2019 11:01:14 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: Insights on connmand -d
To: JH <[email protected]>
Cc: David Weidenkopf <[email protected]>, connman
<[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi JH,
On Tue, Oct 22, 2019 at 10:39:55AM +1100, JH wrote:
> It is really puzzled, why running commond -d in a terminate shell
> command line works, but could not work with systemd service? missing
> some environment setup?
One thing you should check is the systemd enforced capabilities, e.g.
check what is in connman.service. In upstream we have following:
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_NET_RAW
CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_ADMIN
Maybe disable this feature in the systemd service file first to verify
it's the source of the problem.
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 11:08:36 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: Does Connman support to connect home WiFi network by WiFi
modem WPS process?
To: JH <[email protected]>
Cc: connman <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi JH,
On Tue, Oct 29, 2019 at 07:29:08PM +1100, JH wrote:
> I installed connman to a device which connects to home WiFi modem.
> There could be two ways to configure WiFi modem connection:
>
> (1) Set up a wifi.config with WiFi modem Name and Passphrase
> (currently working on my device)
>
> (2) Press WiFi modem WPS button in 3 seconds to allow WiFi device
> (client) automatically set up configuration to connect to WiFi modem.
>
> Is there an option in connman configuration to support to connect to
> the WiFi network automatically by pushing WiFi modem WPS button?
Yes, WPS is supported. IIRC, you need to have an agent running for this
see doc/agent-api.txt (RequestPeerAuthorization) and test/simple-agent
for an example how to use it. IIRC you need to check that
wpa_supplicant also supports it.
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 11:11:53 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: Is there anyway to get SIM ID?
To: JH <[email protected]>
Cc: connman <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
On Thu, Oct 31, 2019 at 03:31:30PM +1100, JH wrote:
> 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.
connmanctrl is writtin in C.
$ls -lh connmanctl
-rwxrwxr-x 1 wagi users 270K Sep 26 08:19 connmanctl
$ ldd connmanctl
linux-vdso.so.1 (0x00007ffc00020000)
libdbus-1.so.3 => /usr/lib64/libdbus-1.so.3 (0x00007efbff65d000)
libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007efbff537000)
libreadline.so.8 => /lib64/libreadline.so.8 (0x00007efbff4e3000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007efbff4de000)
libc.so.6 => /lib64/libc.so.6 (0x00007efbff317000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007efbff2f5000)
libsystemd.so.0 => /usr/lib64/libsystemd.so.0 (0x00007efbff248000)
libpcre.so.1 => /usr/lib64/libpcre.so.1 (0x00007efbff1af000)
libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007efbff17e000)
/lib64/ld-linux-x86-64.so.2 (0x00007efbff6d5000)
librt.so.1 => /lib64/librt.so.1 (0x00007efbff173000)
liblzma.so.5 => /usr/lib64/liblzma.so.5 (0x00007efbff13d000)
liblz4.so.1 => /usr/lib64/liblz4.so.1 (0x00007efbff11b000)
libgcrypt.so.20 => /usr/lib64/libgcrypt.so.20 (0x00007efbfeffa000)
libgpg-error.so.0 => /usr/lib64/libgpg-error.so.0 (0x00007efbfefd6000)
Some interesting dependencies I'd say...
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 11:24:40 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH] vpnc: Inform VPN agent about authentication
errors
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Jussi,
On Wed, Oct 23, 2019 at 05:12:28PM +0300, Jussi Laakkonen wrote:
> Send "VpnAgent.AuthFailure" to VPN agent if there are authentication
> errors to indicate that previous login has failed and new credentials
> are required to be given. Authentication errors are detected from the
> output of VPNC process in io_channel_cb().
Patch applied.
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 11:24:58 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH] l2tp: Cancel queued VPN agent msg when
disconnected
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Jussi,
On Wed, Oct 23, 2019 at 05:15:22PM +0300, Jussi Laakkonen wrote:
> Queued VPN agent messages must be canceled if the plugin timeouts
> without starting the process. This fixes the issue of having multiple
> VPN agent queries stacked on another in such scenario, where L2TP is
> awaiting for user input.
Patch applied.
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 11:25:20 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH] l2tp: Inform VPN agent about authentication
errors
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Jussi,
On Wed, Oct 23, 2019 at 05:17:43PM +0300, Jussi Laakkonen wrote:
> Send "VpnAgent.AuthFailure" to VPN agent if there are authentication
> errors to indicate that previous login has failed and new credentials
> are required to be given. The authentication errors with L2TP are
> recorded when in notify function (l2tp_notify()) auth error is given
> as reason -> vpn.c:vpn_nofity() calls vpn_provider_indicate_error().
Patch applied.
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 11:28:41 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH v2] l2tp: Add default value for 'ipsec saref' to
be able to use 'lock' with pppd
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=iso-8859-1
Hi Jussi,
On Wed, Oct 30, 2019 at 11:54:51AM +0200, Jussi Laakkonen wrote:
> 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.
Patch applied. Though the mail was base64 encoded for some reason and
git am was not able to decode it. I've done the change by hand, so please
check if I screw it up.
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 11:28:59 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH v2] vpnc: Set to use C locale prior to running the
task
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Jussi,
On Thu, Oct 24, 2019 at 02:00:30PM +0300, Jussi Laakkonen wrote:
> Set LANG and LC_ALL to C locale for the VPNC process. This ensures that
> no translations are used. VPNC relies on errors printed to stderr, and
> having translated content makes plugin fail. All VPNC options are ASCII
> string according to specifiation.
>
> The user for running VPN process can be changed with DACPrivileges
> configuration (see commit 171989601a7a4fadafda20a7e6d30e9ada3fb516). If
> the user is changed to other than what connman is ran with a specific
> language may have been set.
> ---
>
> Changes since V2:
> * Set LANG and LC_ALL only for VPNC plugin. It may be too risky to set
> this for all plugins by default, hence the potential breakage of non-
> ASCII passwords noted by David Woodhouse.
Patch applied.
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 11:29:20 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH v2] l2tp: Save 'exclusive' config value in lns
default context
To: Jussi Laakkonen <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi Jussi,
On Wed, Oct 30, 2019 at 04:54:39PM +0200, Jussi Laakkonen wrote:
> 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.
Patch applied.
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 13:34:52 +0100
From: Daniel Wagner <[email protected]>
Subject: Re: [PATCH] plugins/ethernet: fix strncpy errors with GCC>9.1
To: nick83ola <[email protected]>
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii
Hi,
On Sun, Oct 20, 2019 at 02:29:29PM +0100, nick83ola wrote:
> Hi to all,
> I'm not totally sure about this part
>
> +#pragma GCC diagnostic push
> +#pragma GCC diagnostic ignored "-Wstringop-truncation"
> if(ioctl(sk, SIOCSIFVLAN, &vifr) >= 0)
> - strncpy(ifr.ifr_name, vifr.u.device2, sizeof(ifr.ifr_name));
> + strncpy(ifr.ifr_name, vifr.u.device2, sizeof(ifr.ifr_name) -
> 1);
> +#pragma GCC diagnostic pop
>
> The problem is that ifr_name and device2 are defined on my system with
> two different length
>
> What to do in this case?
>
> The rest should be fine
There is an artical about the string truncation detection of gcc:
https://developers.redhat.com/blog/2018/05/24/detecting-string-truncation-with-gcc-8/
The fix to disable the warning is to explicitly set the NUL byte after
the strncpy. I'll send a patch.
Thanks,
Daniel
------------------------------
Date: Sat, 2 Nov 2019 13:39:42 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH v0 0/3] Address a couple of warnings
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=UTF-8
- Replace deprecated GTimeVal with GDateTime
- Address the gcc string truncation warnings
Daniel Wagner (3):
service: Replace GTimeVal with GDateTime
tools: Replace GTimeVal with GDateTime
plugins/ethernet: Properly NUL-terminated strncpy() operations
plugins/ethernet.c | 7 ++++++-
src/service.c | 42 +++++++++++++++++++++++++++++++++++-------
tools/stats-tool.c | 11 ++++++++---
3 files changed, 49 insertions(+), 11 deletions(-)
--
2.23.0
------------------------------
Subject: Digest Footer
_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]
------------------------------
End of connman Digest, Vol 48, Issue 36
***************************************