Send connman mailing list submissions to
        connman@lists.01.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        connman-requ...@lists.01.org

You can reach the person managing the list at
        connman-ow...@lists.01.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. [PATCH] client: Fix memory leak while enabling tethering
      (Saurav Babu)
   2. Re: ConnMan and Cellular (Patrik Flykt)
   3. Re: cellular reconnect (Patrik Flykt)
   4. [PATCH] connman.service: Use ProtectSystem=true to allow
      writing /etc/localtime (Philip Withnall)


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

Message: 1
Date: Mon, 11 Jul 2016 11:27:02 +0530
From: Saurav Babu <saurav.b...@samsung.com>
To: connman@lists.01.org
Cc: sachin....@samsung.com, Saurav Babu <saurav.b...@samsung.com>
Subject: [PATCH] client: Fix memory leak while enabling tethering
Message-ID:
        <1468216622-23323-1-git-send-email-saurav.b...@samsung.com>

"tether" was allocated memory in tether_set_ssid() but was never freed
while enabling tethering.

This is the valgrind report of the issue

==14814== 12 bytes in 1 blocks are definitely lost in loss record 19 of 140
==14814==    at 0x4C2AB80: malloc (in 
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14814==    by 0x50CA610: g_malloc (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==14814==    by 0x408989: cmd_tether (in /usr/local/bin/connmanctl)
==14814==    by 0x409BEA: __connmanctl_commands (in /usr/local/bin/connmanctl)
==14814==    by 0x40A0AA: rl_handler (in /usr/local/bin/connmanctl)
==14814==    by 0x53AE63D: rl_callback_read_char (in 
/lib/x86_64-linux-gnu/libreadline.so.6.3)
==14814==    by 0x40A16D: input_handler (in /usr/local/bin/connmanctl)
==14814==    by 0x50C4CE4: g_main_context_dispatch (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==14814==    by 0x50C5047: g_main_context_iterate.isra.24 (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==14814==    by 0x50C5309: g_main_loop_run (in 
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4002.0)
==14814==    by 0x40A54A: __connmanctl_input_init (in /usr/local/bin/connmanctl)
==14814==    by 0x55EBEC4: (below main) (libc-start.c:287)
---
 client/commands.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/client/commands.c b/client/commands.c
index eec200f..12c5d6d 100644
--- a/client/commands.c
+++ b/client/commands.c
@@ -523,8 +523,12 @@ struct tether_properties {
 
 static int tether_update(struct tether_properties *tether)
 {
-       if (tether->ssid_result == 0 && tether->passphrase_result == 0)
-               return tether_set("wifi", tether->set_tethering);
+       int ret;
+       if (tether->ssid_result == 0 && tether->passphrase_result == 0) {
+               ret = tether_set("wifi", tether->set_tethering);
+               g_free(tether);
+               return ret;
+       }
 
        if (tether->ssid_result != -EINPROGRESS &&
                        tether->passphrase_result != -EINPROGRESS) {
-- 
1.9.1



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

Message: 2
Date: Mon, 11 Jul 2016 10:08:35 +0300
From: Patrik Flykt <patrik.fl...@linux.intel.com>
To: Alexander Smirnov <asmir...@ilbers.de>, conn...@ml01.01.org
Subject: Re: ConnMan and Cellular
Message-ID: <1468220915.2976.11.ca...@linux.intel.com>
Content-Type: text/plain; charset="UTF-8"


        Hi,

On Thu, 2016-06-30 at 18:04 +0300, Alexander Smirnov wrote:
> Dear all,
> 
> I'm trying to setup ConnMan to have cellular always enabled despite
> on?
> other services state.
> 
> What I did:
> ? - Create oFono context with APN settings
> ? - Set AutoConnect=true for cellular
> ? - Tested manual cellular network bring up (connmanctl connect
> cellular...)
> 
> What I've observed:
> ? - If ehternet cable is plugged - cellular is in idle state
> ? - If I down ethernet - cellular becomes available
> 
> I've enabled debugging, and found that "auto_connect_service()"
> always?
> return true on the ethernet service:
> 
> src/service.c:
> 
> 3772:??if (service->pending ||
> 3773???????is_connecting(service) ||
> 3774:??????is_connected(service)) {
> 3775:??????????if (!active_count)
> 3776:??????????????return true;
> 
> 
> Is there any way to get cellular always connected?

ConnMan will use the best technology when more than one choice is
available. The default ordering of the best technologies is ethernet,
wifi and cellular.

When ethernet is already connected, no attempt is made to connect any
of the other technologies. While ethernet is connected, connecting wifi
or cellular manually via dbus with 'connmanctl connect ...', will
result in the service getting connected to its next hop subnet, but the
default route will stay with ethernet - unless ethernet is in state
'ready', and the new service is in the more preferred state 'online'.
At that point the new service in state 'online' is selected over the
one in state 'ready', as 'online' has by definition verified
connectivity to the Internet.

The ordering of technologies can be modified with PreferredTechnologies
in /etc/connman/main.conf.

Cheers,

        Patrik


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

Message: 3
Date: Mon, 11 Jul 2016 10:13:19 +0300
From: Patrik Flykt <patrik.fl...@linux.intel.com>
To: Alexander Smirnov <asmir...@ilbers.de>, connman@lists.01.org,
        of...@ofono.org
Subject: Re: cellular reconnect
Message-ID: <1468221199.2976.16.ca...@linux.intel.com>
Content-Type: text/plain; charset="UTF-8"

On Thu, 2016-06-30 at 18:10 +0300, Alexander Smirnov wrote:
> Dear all,
> 
> could you also please help me with another issue, I've observed.
> 
> What I did:
> 
> ? - Connect cellular service in connmanctl (ppp0 appears in ifconfig)
> ? - Disconnect physical GSM antenna (ppp0 disappears)
> ? - Connect physical GSM antenna
> 
> After these steps I don't see cellular service (connmanctl services
> is empty) till I reset the modem.
> 
> How should I handle network strength events to automatically
> reconnect the cellular? Why I don't see cellular in connman services
> anymore?

This needs a bit more oFono debugging, as ConnMan will present all
networks provided by oFono as separate services. So if a cellular
connection does not show up in ConnMan, check what oFono is sending or
if oFono needs further setup in the case of a reconnected antenna. It
is also important to know which cellular driver is being used here.

Adding oFono mailing list to catch a wider audience.

Cheers,

        Patrik


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

Message: 4
Date: Mon, 11 Jul 2016 18:27:35 +0100
From: Philip Withnall <philip.withn...@collabora.co.uk>
To: connman@lists.01.org
Subject: [PATCH] connman.service: Use ProtectSystem=true to allow
        writing /etc/localtime
Message-ID: <1468258055.25655.2.ca...@collabora.co.uk>
Content-Type: text/plain; charset="utf-8"

Setting the timezone requires unlinking and relinking /etc/localtime,
so
we need /etc to be mounted read?write. This means that commit dc8f151e
has to be softened to ProtectSystem=true rather than
ProtectSystem=full. This mounts most of the filesystem as read-only,
apart from /etc, which is read?write.

Signed-off-by: Philip Withnall <philip.withn...@collabora.co.uk>
---
?src/connman.service.in | 2 +-
?1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/connman.service.in b/src/connman.service.in
index 57eaaf9..d5d6d44 100644
--- a/src/connman.service.in
+++ b/src/connman.service.in
@@ -15,7 +15,7 @@ ExecStart=@sbindir@/connmand -n
?StandardOutput=null
?CapabilityBoundingSet=CAP_KILL CAP_NET_ADMIN CAP_NET_BIND_SERVICE
CAP_NET_RAW CAP_SYS_TIME CAP_SYS_MODULE
?ProtectHome=true
-ProtectSystem=full
+ProtectSystem=true
?
?[Install]
?WantedBy=multi-user.target
--?
2.5.5
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: 
<http://lists.01.org/pipermail/connman/attachments/20160711/30402d0a/attachment-0001.asc>

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

Subject: Digest Footer

_______________________________________________
connman mailing list
connman@lists.01.org
https://lists.01.org/mailman/listinfo/connman


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

End of connman Digest, Vol 9, Issue 3
*************************************

Reply via email to