[PATCH] dnsproxy: Check whether cache cleanup needs to be scheduled

2014-09-17 Thread Hannu Mallat
server_create_socket() may fail for some reason before the cache hash table is created. In this case destroy_server() should not schedule a timeout for deallocating the cache; if it does, cache_refcount may become negative and an attempt to create the cache later on will not work properly, leading

[PATCH 2/2] unit: Add unit test for dnsproxy cache cleanup check

2014-09-17 Thread Hannu Mallat
Unit test for checking that a nonexistent dnsproxy cache is not cleaned up. --- Makefile.am | 9 ++- unit/test-dnsproxy.c | 160 +++ 2 files changed, 167 insertions(+), 2 deletions(-) create mode 100644 unit/test-dnsproxy.c diff --git

[PATCH 1/2] dnsproxy: Check whether cache cleanup needs to be scheduled

2014-09-17 Thread Hannu Mallat
server_create_socket() may fail for some reason before the cache hash table is created. In this case destroy_server() should not schedule a timeout for deallocating the cache; if it does, cache_refcount may become negative and an attempt to create the cache later on will not work properly, leading

[PATCH 0/2] dnsproxy: Check whether cache cleanup needs to be scheduled

2014-09-17 Thread Hannu Mallat
Re-sending the previous patch, this time with a unit test that checks a cleanup timeout isn't scheduled for nonexistent caches. It takes a few seconds to run the test, as it waits for the cleanup timeout to complete, but I didn't want to change the source under test just to speed up the test

[PATCH 2/2] unit: Add unit test for dnsproxy cache cleanup check

2014-09-17 Thread Hannu Mallat
Unit test for checking that a nonexistent dnsproxy cache is not cleaned up. --- Makefile.am | 9 ++- unit/test-dnsproxy.c | 192 +++ 2 files changed, 199 insertions(+), 2 deletions(-) create mode 100644 unit/test-dnsproxy.c diff --git

[PATCH 1/2] dnsproxy: Check whether cache cleanup needs to be scheduled

2014-09-17 Thread Hannu Mallat
server_create_socket() may fail for some reason before the cache hash table is created. In this case destroy_server() should not schedule a timeout for deallocating the cache; if it does, cache_refcount may become negative and an attempt to create the cache later on will not work properly, leading

[PATCH 0/2] dnsproxy: Check whether cache cleanup needs to be scheduled

2014-09-17 Thread Hannu Mallat
One more reworking: unit test needs a few more stubs when compiling without optimization. Hannu Mallat (2): dnsproxy: Check whether cache cleanup needs to be scheduled unit: Add unit test for dnsproxy cache cleanup check Makefile.am | 9 ++- src/dnsproxy.c | 3 +-

[PATCH 2/3] wifi: Check peer_service user_data before invoking cb

2014-09-17 Thread Eduardo Abinader
A check was added, due to the occurrence of peer service registration without callback. Such scenarios takes place, when a previous peer service was registered with a proper callback, on a distinct interface. --- plugins/wifi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH 0/3] Peer service registration fixes

2014-09-17 Thread Eduardo Abinader
This set aims to solve observed issues during peer service register and unregister scenarios. Eduardo Abinader (3): gsupplicant: Check interface on interface_has_p2p wifi: Check peer_service user_data before invoking cb manager: Do not recurse one more level for upnp basic type

[PATCH 1/3] gsupplicant: Check interface on interface_has_p2p

2014-09-17 Thread Eduardo Abinader
Solves a segmentation fault occuring on peer service registration, when a wifi plugin did not have an associated interface while looping in peer service registration. --- gsupplicant/supplicant.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gsupplicant/supplicant.c

Re: [PATCH 0/3] Peer service registration fixes

2014-09-17 Thread Tomasz Bursztyka
Thanks Eduardo, ACK from me. Tomasz ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman

Re: [PATCH 0/3] Peer service registration fixes

2014-09-17 Thread Eduardo Abinader
Thanks, Tomasz. But I just mixed things here: patch 3/3 is actually a separate patch I sent yesterday to ML. Patch 3/3 is actually another one regarding peer_driver unregister. Resending a v2. On Wed, Sep 17, 2014 at 8:01 AM, Tomasz Bursztyka tomasz.burszt...@linux.intel.com wrote: Thanks

[PATCH 1/4] gdhcp: Transaction id was not set when receiving L2 packet

2014-09-17 Thread Jukka Rissanen
The transaction id was always printed as 0x in debug print. --- gdhcp/client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gdhcp/client.c b/gdhcp/client.c index 88c0419..a031501 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -2257,6 +2257,7 @@ static gboolean

[PATCH 2/4] gdhcp: Transaction id is in network byte order

2014-09-17 Thread Jukka Rissanen
Print xid in host byte order so that it is easier to match the value to data in network packet. --- gdhcp/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index a031501..db21e01 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -2329,7

[PATCH 0/4] Misc DHCPv4 patches

2014-09-17 Thread Jukka Rissanen
Hi, there has been some reports that sometimes ConnMan is not able to get IP address from the server. This was eventually traced to broadcast flag that is transmitted in DHCP packets. Some buggy AP discard the DHCP packet if broadcast flag is present and some discard it if it is missing. This is

[PATCH 3/4] gdhcp: Fix memory leak when clearing option hash

2014-09-17 Thread Jukka Rissanen
The option list was not freed after individual options were removed. This is the valgrind report of the issue ==16972== 24 bytes in 1 blocks are definitely lost in loss record 81 of 262 ==16972==at 0x4C2745D: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==16972==by

[PATCH v2 0/3] Peer service registration fixes

2014-09-17 Thread Eduardo Abinader
This set aims to solve observed issues during peer service register and unregister scenarios. Eduardo Abinader (3): gsupplicant: Check interface on interface_has_p2p wifi: Check peer_service user_data before invoking cb peer: Unset peer service driver upon peer unregister

[PATCH 1/3] gsupplicant: Check interface on interface_has_p2p

2014-09-17 Thread Eduardo Abinader
Solves a segmentation fault occuring on peer service registration, when a wifi plugin did not have an associated interface while looping in peer service registration. --- gsupplicant/supplicant.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gsupplicant/supplicant.c

[PATCH 3/3] peer: Unset peer service driver upon peer unregister

2014-09-17 Thread Eduardo Abinader
When peer driver is unregistered, peer service driver should be unregistered as well, in order to ensure proper queueing of peer service registration for later conclusion, when a p2p enabled device is connected. --- src/peer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/peer.c

[PATCH 2/3] wifi: Check peer_service user_data before invoking cb

2014-09-17 Thread Eduardo Abinader
A check was added, due to the occurrence of peer service registration without callback. Such scenarios takes place, when a previous peer service was registered with a proper callback, on a distinct interface. --- plugins/wifi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH] Fix fallback nameservers harder

2014-09-17 Thread Jukka Rissanen
From: Andreas Hartmetz ahartm...@gmail.com - Make sure to insert them with the enabled flag set. No need to touch the flag afterwards. When they are not supposed to be used, they are removed entirely anyway. - Insert the fallbacks also when taking some service offline. As I understand it,

Re: [PATCH v2 0/3] Peer service registration fixes

2014-09-17 Thread Tomasz Bursztyka
ACK on these ones Thanks ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman

Issue doing Connect on a failed service

2014-09-17 Thread Richard Röjfors
Hi, Currently there is an issue in connman when Connect is issued for a failed service. 1. In connect service the incoming DBusMessage is assigned to service-pending. 2. __connman_service_connect is called which will call __connman_service_clear_error. state_ipv4 and state_ipv6 is set to

Re: [PATCH 4/4] gdhcp: Workaround for buggy AP that handle broadcast flag incorrectly

2014-09-17 Thread Marcel Holtmann
Hi Jukka, Some routers/AP handle the DHCP broadcast flag incorrectly. This means that some AP discard the DHCP packet if broadcast flag is present and some discard it if broadcast flag is missing. The workaround is to send two DISCOVER packets in INIT state and two REQUEST packets in