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. [PATCH 0/7] A few more WireGuard fixes (Daniel Wagner)
   2. [PATCH 1/7] vpn: Use correct format specifier for size_t
      (Daniel Wagner)
   3. [PATCH 2/7] client: Prefix VPN serives identifiers with "vpn_"
      (Daniel Wagner)
   4. [PATCH 4/7] doc: Mention new PersistentKeepalive option
      (Daniel Wagner)
   5. [PATCH 3/7] wireguard: Add PersistentKeepalive config option
      (Daniel Wagner)
   6. [PATCH 6/7] wireguard: Make the ListenPort optional
      (Daniel Wagner)
   7. [PATCH 7/7] vpn: Call disconnect() also for non TUN VPNs
      (Daniel Wagner)
   8. [PATCH 5/7] doc: Add missing WireGuard to Type field
      (Daniel Wagner)
   9. How accuracy to get 4G LTE RSSI via connman dbus query? (JH)


----------------------------------------------------------------------

Date: Sun,  8 Dec 2019 18:00:19 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 0/7] A few more WireGuard fixes
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

Fix a few bugs reported by Christian Hewitt. Thanks!

Daniel Wagner (7):
  vpn: Use correct format specifier for size_t
  client: Prefix VPN serives identifiers with "vpn_"
  wireguard: Add PersistentKeepalive config option
  doc: Mention new PersistentKeepalive option
  doc: Add missing WireGuard to Type field
  wireguard: Make the ListenPort optional
  vpn: Call disconnect() also for non TUN VPNs

 client/vpnconnections.c   |  2 +-
 doc/vpn-config-format.txt |  6 +++---
 vpn/plugins/vpn.c         |  6 ++++--
 vpn/plugins/wireguard.c   | 12 +++++++++++-
 4 files changed, 19 insertions(+), 7 deletions(-)

-- 
2.24.0

------------------------------

Date: Sun,  8 Dec 2019 18:00:20 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 1/7] vpn: Use correct format specifier for size_t
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

Prefix the interger conversion to the correspond type size_t.

Reported by Christian Hewitt.
---
 vpn/plugins/vpn.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c
index 96a06299be09..b1a64b18a1bb 100644
--- a/vpn/plugins/vpn.c
+++ b/vpn/plugins/vpn.c
@@ -523,7 +523,7 @@ static void vpn_task_setup(gpointer user_data)
        gid = get_gid(group);
        gid_list_size = get_supplementary_gids(suppl_groups, &gid_list);
 
-       DBG("vpn_task_setup uid:%d gid:%d supplementary group list size:%lu",
+       DBG("vpn_task_setup uid:%d gid:%d supplementary group list size:%zu",
                                        uid, gid, gid_list_size);
 
 
-- 
2.24.0

------------------------------

Date: Sun,  8 Dec 2019 18:00:21 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 2/7] client: Prefix VPN serives identifiers with
        "vpn_"
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

The vpnconnections command list the available VPNs exported by
connman-vpnd without the "vpn_" prefix. While this is the correct
identifier for accessing the object via D-Bus exposed by connman-vpnd,
it is not the identifier connmand exposes. All VPN services will be
prefix in __connman_service_create_from_provider() in src/service.c
and therefore 'connmanctl services' list all VPN services with the
prefix.

To avoid confusion it's better to prefix the identifiers
vpnconnections list with "vpn_".

Reported by Christian Hewitt.
---
 client/vpnconnections.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/vpnconnections.c b/client/vpnconnections.c
index d7bcbfeee9d1..7cef6bbe56c2 100644
--- a/client/vpnconnections.c
+++ b/client/vpnconnections.c
@@ -72,7 +72,7 @@ static void print_connection(char *path, DBusMessageIter 
*iter)
        else
                str = path;
 
-       fprintf(stdout, "  %c %-20s %s", state, name, str);
+       fprintf(stdout, "  %c %-20s vpn_%s", state, name, str);
 }
 
 void __connmanctl_vpnconnections_list(DBusMessageIter *iter)
-- 
2.24.0

------------------------------

Date: Sun,  8 Dec 2019 18:00:23 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 4/7] doc: Mention new PersistentKeepalive option
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

---
 doc/vpn-config-format.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/vpn-config-format.txt b/doc/vpn-config-format.txt
index d92cdc0bb2a3..3879a35ed078 100644
--- a/doc/vpn-config-format.txt
+++ b/doc/vpn-config-format.txt
@@ -287,6 +287,7 @@ WireGuard VPN supports following options
  WireGuard.PublicKey                      Public key of peer
  WireGuard.AllowedIPs                     See Cryptokey Routing
  WireGuard.EndpointPort                   Endpoint listen port (optional)
+ WireGuard.PersistentKeepalive            Keep alive in seconds (optional)
 
 
 Example
-- 
2.24.0

------------------------------

Date: Sun,  8 Dec 2019 18:00:22 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 3/7] wireguard: Add PersistentKeepalive config option
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

Add the optional PersistentKeepalive configuration option for the peer.

Reported by Christian Hewitt.
---
 vpn/plugins/wireguard.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/vpn/plugins/wireguard.c b/vpn/plugins/wireguard.c
index 4d2fe3c3ad75..34ce6b566263 100644
--- a/vpn/plugins/wireguard.c
+++ b/vpn/plugins/wireguard.c
@@ -293,6 +293,15 @@ static int wg_connect(struct vpn_provider *provider,
        if (err)
                goto done;
 
+       option = vpn_provider_get_string(provider,
+                                       "WireGuard.PersistentKeepalive");
+       if (option) {
+               char *end;
+               info->peer.persistent_keepalive_interval =
+                       g_ascii_strtoull(option, &end, 10);
+               info->peer.flags |= WGPEER_HAS_PERSISTENT_KEEPALIVE_INTERVAL;
+       }
+
        option = vpn_provider_get_string(provider, "WireGuard.EndpointPort");
        if (!option)
                option = "51820";
-- 
2.24.0

------------------------------

Date: Sun,  8 Dec 2019 18:00:25 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 6/7] wireguard: Make the ListenPort optional
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

The ListenPort is optional, therefore only set teh device.flags field
if we really set it.
---
 vpn/plugins/wireguard.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vpn/plugins/wireguard.c b/vpn/plugins/wireguard.c
index 34ce6b566263..5ad87b43bc31 100644
--- a/vpn/plugins/wireguard.c
+++ b/vpn/plugins/wireguard.c
@@ -254,7 +254,7 @@ static int wg_connect(struct vpn_provider *provider,
 
        info = g_malloc0(sizeof(struct wireguard_info));
        info->peer.flags = WGPEER_HAS_PUBLIC_KEY | WGPEER_REPLACE_ALLOWEDIPS;
-       info->device.flags = WGDEVICE_HAS_PRIVATE_KEY | 
WGDEVICE_HAS_LISTEN_PORT;
+       info->device.flags = WGDEVICE_HAS_PRIVATE_KEY;
        info->device.first_peer = &info->peer;
        info->device.last_peer = &info->peer;
 
@@ -264,6 +264,7 @@ static int wg_connect(struct vpn_provider *provider,
        if (option) {
                char *end;
                info->device.listen_port = g_ascii_strtoull(option, &end, 10);
+               info->peer.flags |= WGDEVICE_HAS_LISTEN_PORT;
        }
 
        option = vpn_provider_get_string(provider, "WireGuard.PrivateKey");
-- 
2.24.0

------------------------------

Date: Sun,  8 Dec 2019 18:00:26 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 7/7] vpn: Call disconnect() also for non TUN VPNs
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

Add the missing disconnect() call. In case where the D-Bus
'disconnect' method call is not used to shutdown the connection, we
leak the connection.

For example when the users edits the config file, we end up in the
stop_vpn() function with an active WireGuard connection.

Fixes 12f095a32eff ("vpn: Introduce VPN_FLAG_NO_DAEMON")
Reported by Christian Hewitt
---
 vpn/plugins/vpn.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vpn/plugins/vpn.c b/vpn/plugins/vpn.c
index b1a64b18a1bb..e4d04635654e 100644
--- a/vpn/plugins/vpn.c
+++ b/vpn/plugins/vpn.c
@@ -89,8 +89,10 @@ static int stop_vpn(struct vpn_provider *provider)
        vpn_driver_data = g_hash_table_lookup(driver_hash, name);
 
        if (vpn_driver_data && vpn_driver_data->vpn_driver &&
-                       vpn_driver_data->vpn_driver->flags & VPN_FLAG_NO_TUN)
+                       vpn_driver_data->vpn_driver->flags & VPN_FLAG_NO_TUN) {
+               vpn_driver_data->vpn_driver->disconnect(data->provider);
                return 0;
+       }
 
        memset(&ifr, 0, sizeof(ifr));
        ifr.ifr_flags = data->tun_flags | IFF_NO_PI;
-- 
2.24.0

------------------------------

Date: Sun,  8 Dec 2019 18:00:24 +0100
From: Daniel Wagner <[email protected]>
Subject: [PATCH 5/7] doc: Add missing WireGuard to Type field
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Message-ID: <[email protected]>

244c2a69bf33 ("doc: Document WireGuard VPN plugin") missed to add
WireGuard to the Type field.

While at it, also streamline the number of empty lines between the
sections.

Reported by Christian Hewitt.
---
 doc/vpn-config-format.txt | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/doc/vpn-config-format.txt b/doc/vpn-config-format.txt
index 3879a35ed078..34d4227702fc 100644
--- a/doc/vpn-config-format.txt
+++ b/doc/vpn-config-format.txt
@@ -32,7 +32,8 @@ Each provisioned provider must start with the [provider_*] 
tag.
 Replace * with an identifier unique to the config file.
 
 Allowed fields:
-- Type: Provider type. Value of OpenConnect, OpenVPN, VPNC, L2TP or PPTP
+- Type: Provider type. Value of OpenConnect, OpenVPN, VPNC, L2TP, PPTP or
+        WireGuard
 
 VPN related parameters (M = mandatory, O = optional):
 - Name: A user defined name for the VPN (M)
@@ -253,7 +254,6 @@ L2TP VPN supports following options (see xl2tpd.conf(5) and 
pppd(8) for details)
  PPPD.ReqMPPEStateful mppe-stateful         Allow MPPE to use stateful mode (O)
  PPPD.NoVJ           novj                   No Van Jacobson compression (O)
 
-
 PPTP VPN supports following options (see pptp(8) and pppd(8) for details)
  Option name         pptp config value    Description
  PPTP.User           -                    PPTP user name, asked from the user
@@ -278,7 +278,6 @@ PPTP VPN supports following options (see pptp(8) and 
pppd(8) for details)
  PPPD.RequirMPPEStateful mppe-stateful    Allow MPPE to use stateful mode (O)
  PPPD.NoVJ           novj                 No Van Jacobson compression (O)
 
-
 WireGuard VPN supports following options
  Option name                              Description
  WireGuard.Address                        Internal IP address 
(local/netmask/peer)
-- 
2.24.0

------------------------------

Date: Mon, 9 Dec 2019 17:50:38 +1100
From: JH <[email protected]>
Subject: How accuracy to get 4G LTE RSSI via connman dbus query?
To: connman <[email protected]>
Cc: ofono <[email protected]>
Message-ID:
        <CAA=hcWRuZf0kk+HOhWL5=hfspp6ngql8cirvhcrj89znx3u...@mail.gmail.com>
Content-Type: multipart/alternative;
        boundary="000000000000574a2905993fd276"

--000000000000574a2905993fd276
Content-Type: text/plain; charset="UTF-8"

Hi,

I get 4G LTE RSSI from dbus connman service, I usually got about -61 I
thought it was accurate. But today, we are doing a test to check 4G LTE
RSSI based on different antennas, when connected to a antenna, the RSSI is
about -61, when I did not connect to an antenna, the RSSI = -40 but the 4G
LTE connection lost:

kernel: qmi_wwan 1-1:1.3: nonzero urb status received: -71.

Apparently that RSSI = -40 was wrong in the situation of without antenna
connection. I tried to build qmicli, but I could not get it running.
googling Internet, people pointed out, it could not be run if the qmi is
running by other services (ofono is running qmi on /dev/cdc-wdm0).

# qmicli --nas-get-signal-strength --device=/dev/cdc-wdm0
error: couldn't create client for the 'nas' service: CID allocation failed
in the CTL client: Transaction timed out

Appreciate tips how to get qmicli running.

Thank you.

Kind regards,

- jh

--000000000000574a2905993fd276
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:garamond=
,serif">Hi,</div><div class=3D"gmail_default" style=3D"font-family:garamond=
,serif"><br></div><div class=3D"gmail_default" style=3D"font-family:garamon=
d,serif">I get 4G LTE RSSI from dbus connman service, I usually got about -=
61 I thought it was accurate. But today, we are doing a test to check 4G LT=
E RSSI based on different antennas, when connected to a antenna, the RSSI i=
s about -61, when I did not connect to an antenna, the RSSI =3D -40 but the=
 4G LTE connection lost:</div><div class=3D"gmail_default" style=3D"font-fa=
mily:garamond,serif"><br></div><div class=3D"gmail_default" style=3D"font-f=
amily:garamond,serif">kernel: qmi_wwan 1-1:1.3: nonzero urb status received=
: -71. <br></div><div class=3D"gmail_default" style=3D"font-family:garamond=
,serif"><br></div><div class=3D"gmail_default" style=3D"font-family:garamon=
d,serif">Apparently that RSSI =3D -40 was wrong in the situation of without=
 antenna connection. I tried to build qmicli, but I could not get it runnin=
g. googling Internet, people pointed out, it could not be run if the qmi is=
 running by other services (ofono is running qmi on /dev/cdc-wdm0). <br></d=
iv><div class=3D"gmail_default" style=3D"font-family:garamond,serif"><br></=
div><div class=3D"gmail_default" style=3D"font-family:garamond,serif"># qmi=
cli --nas-get-signal-strength --device=3D/dev/cdc-wdm0<br>error: couldn&#39=
;t create client for the &#39;nas&#39; service: CID allocation failed in th=
e CTL client: Transaction timed out</div><div class=3D"gmail_default" style=
=3D"font-family:garamond,serif"><br></div><div class=3D"gmail_default" styl=
e=3D"font-family:garamond,serif">Appreciate tips how to get qmicli running.=
</div><div class=3D"gmail_default" style=3D"font-family:garamond,serif"><br=
></div><div class=3D"gmail_default" style=3D"font-family:garamond,serif">Th=
ank you.</div><div class=3D"gmail_default" style=3D"font-family:garamond,se=
rif"><br></div><div class=3D"gmail_default" style=3D"font-family:garamond,s=
erif">Kind regards,</div><div class=3D"gmail_default" style=3D"font-family:=
garamond,serif"><br></div><div class=3D"gmail_default" style=3D"font-family=
:garamond,serif">- jh<br></div></div>

--000000000000574a2905993fd276--

------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list -- [email protected]
To unsubscribe send an email to [email protected]


------------------------------

End of connman Digest, Vol 50, Issue 2
**************************************

Reply via email to