[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 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 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 gsupplicant

[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] manager: Do not recurse one more level for upnp basic type

2014-09-16 Thread Eduardo Abinader
Just recurse one more level for the byte array that corresponds to bonjour data and not for the variant holding upnp data. This patch prevents a segmentation fault occuring by dereferencing null upnp data. --- src/manager.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH 0/2] Code cleanup in inet

2014-09-09 Thread Eduardo Abinader
Remove two unused functions in inet. Eduardo Abinader (2): Remove unused function connman_inet_ifflags Remove unused function connman_inet_is_cfg80211 include/inet.h | 4 src/inet.c | 60 -- 2 files changed, 64 deletions

[PATCH 2/2] Remove unused function connman_inet_is_cfg80211

2014-09-09 Thread Eduardo Abinader
Removing as this function is no longer being used. --- include/inet.h | 2 -- src/inet.c | 30 -- 2 files changed, 32 deletions(-) diff --git a/include/inet.h b/include/inet.h index 807febb..6482934 100644 --- a/include/inet.h +++ b/include/inet.h @@ -39,8 +39,6

[PATCH 1/2] Remove unused function connman_inet_ifflags

2014-09-09 Thread Eduardo Abinader
As the referred function is no longer called in code, it should be removed as well. --- include/inet.h | 2 -- src/inet.c | 30 -- 2 files changed, 32 deletions(-) diff --git a/include/inet.h b/include/inet.h index a836a5b..807febb 100644 --- a/include/inet.h +++

[PATCH] gsupplicant: Defer group request to peer property

2014-09-05 Thread Eduardo Abinader
There exists scenarios, when connman receives a group request and the requesting peer hasn't been discovered yet, wpa_supplicant issues a peer found just before signaling group request. However, the just signaled peer found have its properties published by wpa_s on a timeout basis (dbus property),

[PATCH 0/2] Clean group interface and mapping

2014-09-02 Thread Eduardo Abinader
When a p2p group is finished, the peers holding the just removed group interface shall be updated accordingly. The same must happen to group_mapping, as the p2p group was finished. Eduardo Abinader (2): gsupplicant: Remove peer group interface when group finished gsupplicant: Update

[PATCH 2/2] gsupplicant: Update group_mapping when group finished

2014-09-02 Thread Eduardo Abinader
Just updating group_mapping accordingly, as a p2p group has been signaled as finished. --- gsupplicant/supplicant.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 903def7..9796fe8 100644 --- a/gsupplicant/supplicant.c +++

[PATCH 1/2] gsupplicant: Remove peer group interface when group finished

2014-09-02 Thread Eduardo Abinader
When a p2p group has finished, update corresponding peers group interface. --- gsupplicant/supplicant.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 049a5b2..903def7 100644 --- a/gsupplicant/supplicant.c

[PATCH] service: Move dbg on service_schedule_removed after sanity check

2014-09-02 Thread Eduardo Abinader
Avoid an invalid read by moving debug message after sanity check. --- src/service.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/service.c b/src/service.c index f5c0a23..d5f95ed 100644 --- a/src/service.c +++ b/src/service.c @@ -4358,13 +4358,13 @@ static void

[PATCH] gsupplicant: Add property calls to property_calls list

2014-09-02 Thread Eduardo Abinader
Although the logic for handling property call list was available, the property call list was not being populated. --- gsupplicant/dbus.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/gsupplicant/dbus.c b/gsupplicant/dbus.c index 130306e..4ff5d50 100644 --- a/gsupplicant/dbus.c +++

[PATCH] peer: Add debug msg for peer state

2014-08-28 Thread Eduardo Abinader
In order to ease the debug task of peer state changes, inserted this old state/new state track. --- src/peer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/peer.c b/src/peer.c index 7e733d3..d5d7c8e 100644 --- a/src/peer.c +++ b/src/peer.c @@ -786,6 +786,9 @@ int

[PATCH 1/2] wifi: Add an extra check for pending wifi data

2014-08-20 Thread Eduardo Abinader
Got another segmentation fault on chicken and egg issue. Now, it is necessary to check device pointer. --- plugins/wifi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index f5af702..bdb4c24 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@

[PATCH 0/3] Some improvement in p2p find

2014-08-15 Thread Eduardo Abinader
Bursztyka Eduardo Abinader (3): gsupplicant: Start p2p finding even if scanning supplicant: Added a function to detect if p2p is finding wifi: Start P2P find if there's no ongoing discovery gsupplicant/gsupplicant.h | 1 + gsupplicant/supplicant.c | 10 +- plugins/wifi.c| 7

[PATCH 2/3] supplicant: Added a function to detect if p2p is finding

2014-08-15 Thread Eduardo Abinader
Just a getter for p2p_finding status. --- gsupplicant/gsupplicant.h | 1 + gsupplicant/supplicant.c | 8 2 files changed, 9 insertions(+) diff --git a/gsupplicant/gsupplicant.h b/gsupplicant/gsupplicant.h index 207e281..28cfe10 100644 --- a/gsupplicant/gsupplicant.h +++

[PATCH 3/3] wifi: Start P2P find if there's no ongoing discovery

2014-08-15 Thread Eduardo Abinader
Just to avoid an amount of p2p_call, if another is already taking place. --- plugins/wifi.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index f741bec..f5af702 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -1376,7 +1376,7 @@

Re: [PATCH 2/3] supplicant: Added a function to detect if p2p is finding

2014-08-15 Thread Eduardo Abinader
Oh, sorry, Tomasz. Should I resend the patchet? On Fri, Aug 15, 2014 at 7:15 AM, Tomasz Bursztyka tomasz.burszt...@linux.intel.com wrote: Very minor nitpick here: supplicant: Added a function to detect if p2p is finding -- gsupplicant: Add a function to detect if p2p is finding

Re: [PATCH 2/3] supplicant: Added a function to detect if p2p is finding

2014-08-15 Thread Eduardo Abinader
Thanks, Patrik. On Aug 15, 2014 7:31 AM, Patrik Flykt patrik.fl...@linux.intel.com wrote: On Fri, 2014-08-15 at 07:29 -0400, Eduardo Abinader wrote: Should I resend the patchet? I'll fix in when applying. Cheers, Patrik ___ connman

[PATCH 2/2] wifi: Start P2P find if there's no ongoing discovery

2014-08-13 Thread Eduardo Abinader
Just to avoid an amount of p2p_call, if another is already taking place. --- gsupplicant/gsupplicant.h | 2 ++ gsupplicant/supplicant.c | 8 plugins/wifi.c| 8 +++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/gsupplicant/gsupplicant.h

[PATCH 0/2] Some improvement in p2p find

2014-08-13 Thread Eduardo Abinader
The following patchset tries to improve the peer discovery, by antecipating p2p find start, if requested, despite a wifi scan running. Furthermore, detects if there's an ongoing p2p find and returns earlier. Thanks for feedback from Tomasz Bursztyka Eduardo Abinader (2): gsupplicant: Start

[PATCH 1/2] gsupplicant: Start p2p finding even if scanning

2014-08-13 Thread Eduardo Abinader
In order to avoid deferred p2p find, if a scan is taking place, a request to start a p2p discovery could be initiated or scheduled (radio work add in wpa_suplicant) despite wifi scanning. --- gsupplicant/supplicant.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] wifi: Add sanity check in the middle of chicken and egg issue

2014-08-10 Thread Eduardo Abinader
Got a segmentation fault in the middle of a group configuration, where the pending p2p-wlan was no more available. This check actually comes ahead of another one in interface_added. --- plugins/wifi.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/plugins/wifi.c

[PATCH] main: Change cleanup order for proper peer deinit

2014-08-10 Thread Eduardo Abinader
Cleanup is causing an invalid read during deinitialization of an already freed ippool. Just moving the cleanup order, ensures proper deinitialization of ippool references. --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index

[PATCH] gsupplicant: Avoid invalid read during system_killed

2014-08-10 Thread Eduardo Abinader
When terminating a connman instance with ready p2p connection, interface_table was trying to free a removed interface, so just inverting the deinit order, solves the issue. --- gsupplicant/supplicant.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH] gsupplicant: Do P2P detection after interface property load

2014-08-07 Thread Eduardo Abinader
Good news! Thanks, Tomasz. On Thu, Aug 7, 2014 at 7:43 AM, Tomasz Bursztyka tomasz.burszt...@linux.intel.com wrote: Hi Eduardo, Finally it seems possible for connman to sync up with wpa_supplicant and existing interface (see patch [PATCH v2] device: Make sure the device is up and running

[PATCH] wifi: Remove useless return statement in interface_added

2014-08-06 Thread Eduardo Abinader
Just code cleaning a meaningless return on the last line of a void function. --- plugins/wifi.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index 70eb661..861304b 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -1828,9 +1828,6 @@ static void

[PATCH] gsupplicant: Do P2P detection after interface property load

2014-08-06 Thread Eduardo Abinader
When interface was already created in wpa_supplicant, p2p detection was failing. Thus, calling p2p detection after interface property has been signaled fixes this detection failure. --- gsupplicant/supplicant.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff

[PATCH] gsupplicant: Remove duplicated interface assignment on GroupStarted

2014-08-06 Thread Eduardo Abinader
Removing a previous interface assignment, although the correct value was assigned at last. --- gsupplicant/supplicant.c | 1 - 1 file changed, 1 deletion(-) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index b8ad5a2..61cbd93 100644 --- a/gsupplicant/supplicant.c +++

[PATCH] gsupplicant: Detect p2p support based on capability modes

2014-08-04 Thread Eduardo Abinader
The use of p2p_stop_find to detect p2p support is not a trusted approach, due to p2p_stop_find currently implemented in wpa_supplicant does not check p2p availability, as p2p_find does, for instance. Therefore, capabilitiy modes property, retrieved on interface added signal, is a proper way to

[PATCH] wifi: Free g_hash_table_get_values on connect_peer

2014-08-01 Thread Eduardo Abinader
Glist returned from g_hash_table_get_values was not being freed during p2p connect, causing a leak. --- src/peer.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/peer.c b/src/peer.c index 7f23059..1d802e1 100644 --- a/src/peer.c +++ b/src/peer.c @@ -480,7 +480,7

[PATCH] wifi: Don't allow autoscan for p2p interfaces

2014-07-31 Thread Eduardo Abinader
Accordding to p2p spec, a p2p device is not supposed to carry wifi scan, specially a client device. Thus this patch avoids autoscan and solves a segmentation fault issue occuring in g_supplicant_interface_autoscan, due to a null interface pointer. --- plugins/wifi.c | 6 ++ 1 file changed, 6

[PATCH 1/1] Update p2p scan status, when disabling wifi

2014-07-29 Thread Eduardo Abinader
Whenever wifi plugin is disabled and p2p find is running, a double device unref was occurring. By setting scanning to false, avoids duplicated device unref. --- plugins/wifi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/wifi.c b/plugins/wifi.c index ce6d7e7..5f383bd 100644 ---

[PATCH 1/1 v2] wifi: Update p2p scan status, when disabling wifi

2014-07-29 Thread Eduardo Abinader
Whenever wifi plugin is disabled and p2p find is running, a double device unref was occurring. By setting scanning to false, avoids duplicated device unref. --- plugins/wifi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/wifi.c b/plugins/wifi.c index ce6d7e7..5f383bd 100644 ---

[PATCH 2/2] Let dhcp_server_unref stop dhcp_server

2014-07-24 Thread Eduardo Abinader
P2P peer was explicit stopping dhcp_server besides dhcp_server_unref, which already takes care of server stopping. --- src/peer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/peer.c b/src/peer.c index 39877ec..3107f0a 100644 --- a/src/peer.c +++ b/src/peer.c @@ -62,7 +62,6 @@ static

[PATCH 1/2] Check wifi plugin exists before removing peer

2014-07-24 Thread Eduardo Abinader
Do sanity check before using wifi pointer on peer_lost. --- plugins/wifi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/wifi.c b/plugins/wifi.c index eb1fad0..ce6d7e7 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -2291,6 +2291,9 @@ static void peer_lost(GSupplicantPeer

[PATCH 2/2] Let dhcp_server_unref stop dhcp_server

2014-07-24 Thread Eduardo Abinader
P2P peer was explicit stopping dhcp_server besides dhcp_server_unref, which already takes care of server stopping. --- src/peer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/peer.c b/src/peer.c index 39877ec..d627487 100644 --- a/src/peer.c +++ b/src/peer.c @@

[PATCH 0/2 v2] Avoid segfault on connman deinitialization

2014-07-24 Thread Eduardo Abinader
Applied change Tomasz has requested on this patchset v2. Eduardo Abinader (2): Check wifi plugin exists before removing peer Let dhcp_server_unref stop dhcp_server plugins/wifi.c | 3 +++ src/peer.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) -- 1.9.1

[PATCH 1/1] test: Set command_list properly

2014-05-28 Thread Eduardo Abinader
Command list passed to wpa_s was not being extracted from arg list, but storing the whole list. This caused the help to be buggy. --- test/p2p-on-supplicant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index 3e6f277..826656e

Re: [PATCH 2/2] test: Arg parsing for p2p-on-supplication

2014-05-14 Thread Eduardo Abinader
Hi Tomasz, On Wed, May 14, 2014 at 2:54 AM, Tomasz Bursztyka tomasz.burszt...@linux.intel.com wrote: Hi Eduardo, Minor issue: @@ -100,37 +105,33 @@ class Wpa_s: bus.add_signal_receiver(self.__InterfaceRemoved, path=WPA_PATH,

[PATCH 2/2] test: Arg parsing for p2p-on-supplication

2014-05-14 Thread Eduardo Abinader
Argument parsing functionality for commands and options: - dbus is now wpa_s property - help is being shown from the command_list built in arg parse time - Added enum like class (ArgFields) for future options in arg parsing --- test/p2p-on-supplicant | 174

[PATCH 1/2] test: Minor typos removal in p2p-on-supplicant

2014-05-14 Thread Eduardo Abinader
Removed minor typo issues in p2p-on-supplicant. --- test/p2p-on-supplicant | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index e845c88..734396e 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@ -185,7

[PATCH 2/2] test: Added P2P invite call and signal result

2014-05-14 Thread Eduardo Abinader
Invite discovered P2P peer to join or form a group. --- test/p2p-on-supplicant | 26 ++ 1 file changed, 26 insertions(+) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index 68b4996..3e6f277 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@

[PATCH 1/2] test: Fix code style in p2p-on-supplicant

2014-05-14 Thread Eduardo Abinader
Just complying to code style. --- test/p2p-on-supplicant | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index 025bf6e..68b4996 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@ -21,8 +21,8 @@

[PATCH 0/2] test: Code style issues and P2P Invite

2014-05-14 Thread Eduardo Abinader
This patchset solves code style minor issues and adds P2P invite and its signal. Eduardo Abinader (2): test: Fix code style in p2p-on-supplicant test: Added P2P invite call and signal result test/p2p-on-supplicant | 31 --- 1 file changed, 28 insertions(+), 3

[PATCH 2/2] test: Arg parsing for p2p-on-supplication

2014-05-13 Thread Eduardo Abinader
Argument parsing functionality for commands and options. --- test/p2p-on-supplicant | 176 +++-- 1 file changed, 128 insertions(+), 48 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index 734396e..bc10ad2 100755 ---

[PATCH 1/2] test: Minor typos removal in p2p-on-supplicant

2014-05-13 Thread Eduardo Abinader
Removed minor typo issues in p2p-on-supplicant. --- test/p2p-on-supplicant | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index e845c88..734396e 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@ -185,7

[PATCH 2/2] test: Arg parsing for p2p-on-supplication

2014-05-13 Thread Eduardo Abinader
Argument parsing functionality for commands and options. --- test/p2p-on-supplicant | 176 +++-- 1 file changed, 128 insertions(+), 48 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index 734396e..7930242 100755 ---

[PATCH 1/2] test: Minor typos removal in p2p-on-supplicant

2014-05-13 Thread Eduardo Abinader
Removed minor typo issues in p2p-on-supplicant. --- test/p2p-on-supplicant | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index e845c88..734396e 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@ -185,7

[PATCH 0/2] Improvements for p2p-on-supplicant

2014-05-13 Thread Eduardo Abinader
Please consider this patchset, instead of previously sent patchset. Eduardo Abinader (2): test: Minor typos removal in p2p-on-supplicant test: Arg parsing for p2p-on-supplication test/p2p-on-supplicant | 180 +++-- 1 file changed, 130 insertions

Re: Connman crashes when loosing network

2014-05-01 Thread Eduardo Abinader
Could you please try with HEAD version and pastebin the logs? Saw a refcount issue in: 05/01/14 09:56:55 AM connmand[26030]: src/ipconfig.c:__connman_ipconfig_unref_debug() 0xa9fd8 ref -1 by src/ipconfig.c:1707:__connman_ipconfig_disable() But I don't know which version your are

[PATCH 0/2] Device detection upon systemd-udev renaming

2014-04-29 Thread Eduardo Abinader
): while preparing this patch, noticed segfault in scan_callback, when removing wifi dongle. Thus the second patch refers to this occurrence. Eduardo Abinader (2): Don't ignore RTM_NEWLINK, when ifname has changed Avoid invalid read in scan_callback gsupplicant/supplicant.c | 3 +++ include

[PATCH 1/2] Don't ignore RTM_NEWLINK, when ifname has changed

2014-04-29 Thread Eduardo Abinader
Whenever systemd-udev renames a device, the orginal ifindex is kept and consequently connman is unable to issue a proper create interface to reflect such device change. --- include/device.h | 1 + src/detect.c | 15 +-- src/device.c | 20 3 files changed,

[PATCH 2/2] Avoid invalid read in scan_callback

2014-04-29 Thread Eduardo Abinader
If a pending scan_callback is called after a dongle removal, invalid reads occur in connman_device_reset_scanning, for instance. This patch cleans the callback, before dbus remove interface is returned. --- gsupplicant/supplicant.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [PATCH 2/2] Avoid network duplicate unref for eth_dev_remote

2014-04-17 Thread Eduardo Abinader
Hi Tomasz, Below you find my valgrind output. As you mentioned, the network reference device is freeing is the the one it creates, in this case, it is created in eth_newlink. I could not see any network referenced by eth which is not via device, so that's the reason I patched by removing

Re: [PATCH 2/2] Avoid network duplicate unref for eth_dev_remote

2014-04-17 Thread Eduardo Abinader
Hi Tomasz, Connman logs: http://pastebin.com/qFGaw29x Cheers. On Thu, Apr 17, 2014 at 9:35 AM, Tomasz Bursztyka tomasz.burszt...@linux.intel.com wrote: Hi Eduardo, As you mentioned, the network reference device is freeing is the the one it creates, in this case, it is created in

Re: [PATCH 2/2] Avoid network duplicate unref for eth_dev_remote

2014-04-17 Thread Eduardo Abinader
Surely. anyway, please check my first patch, applied in dhcp_invalidate. I going to investigate further this issue you just mentioned. BR. On Thu, Apr 17, 2014 at 10:08 AM, Tomasz Bursztyka tomasz.burszt...@linux.intel.com wrote: Thanks, Now it's possible to pin point which part is

[PATCH 1/1] Avoid invalid reads in dhcp_invalidate

2014-04-17 Thread Eduardo Abinader
dhcp_invalidate was freeing dhcp and duplicating network unref (reported by Tomasz Bursztyka), thus causinhg invalid reads, when ipv4ll_announce_timeout was triggered. The patch consists of freeing dhcp only when dhcp is stopped and network removal and unref are previously checked against

[PATCH 0/2] Invalid reads found

2014-04-16 Thread Eduardo Abinader
Noticed some invalid reads in two scenarios: 1) ipv4ll_available_cb (timeout triggered) referenced freed dhcp. 2) On connmand termination, invalid read was found in eth_dev_remote, due to duplicate network unref. The next two patches fix the issues above. Eduardo Abinader (2): Free

[PATCH 2/2] Avoid network duplicate unref for eth_dev_remote

2014-04-16 Thread Eduardo Abinader
Network unreference is already being done by free_network, called by g_hash_table_remove. This patche prevents from an invalid read during nework removal. --- plugins/ethernet.c | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/ethernet.c b/plugins/ethernet.c index b8e52ce..aa1153b

[PATCH 1/2] Free dhcp only when dhcp is stopped

2014-04-16 Thread Eduardo Abinader
Freeing dhcp in dhcp_invalidate is causing invalid reads in ipv4ll_available_cb, called by annouce timeout. Just freeing the dhcp struct, when dhcp is stopped is more suitable. --- src/dhcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dhcp.c b/src/dhcp.c index

[PATCH 1/1] Fix p2p driver probe

2014-04-03 Thread Eduardo Abinader
For a p2p driver previously registered, after disabling wifi and enabling again, p2p driver probe was missing. --- src/technology.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/technology.c b/src/technology.c index 5a12202..fdb429a 100644 --- a/src/technology.c +++

[PATCH 1/1] Fix typo p2p-on-supplicant

2014-03-18 Thread Eduardo Abinader
fix typo on p2p_service_flush --- test/p2p-on-supplicant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/p2p-on-supplicant b/test/p2p-on-supplicant index 2bb02ba..b59c11c 100755 --- a/test/p2p-on-supplicant +++ b/test/p2p-on-supplicant @@ -374,7 +374,7 @@ class Wpa_s: