[PATCH v3 1/2] wifi: p2p: Fix several unref of NULL pointer.
by John Ernberg
From: John Ernberg <john.ernberg(a)actia.se>
When a Wi-Fi dongle would be removed from the system or if wpa_supplicant
would send a system_killed signal it's possible that the wifi plugin is
destroyed before gsupplicant has reached a state where it will no longer
call any callbacks.
This would result in various SIGSEGV abortions by unref of NULL pointer.
The changes to the p2p scanning were copied from wifi scanning.
---
plugins/wifi.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 9e9ad64..82834ce 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -309,7 +309,7 @@ static int peer_connect(struct connman_peer *peer,
return -ENODEV;
wifi = connman_device_get_data(device);
- if (!wifi)
+ if (!wifi || !wifi->interface)
return -ENODEV;
if (wifi->p2p_connecting)
@@ -1678,12 +1678,14 @@ static gboolean p2p_find_stop(gpointer data)
DBG("");
- wifi->p2p_find_timeout = 0;
+ if (wifi) {
+ wifi->p2p_find_timeout = 0;
+
+ g_supplicant_interface_p2p_stop_find(wifi->interface);
+ }
connman_device_set_scanning(device, CONNMAN_SERVICE_TYPE_P2P, false);
- g_supplicant_interface_p2p_stop_find(wifi->interface);
-
connman_device_unref(device);
reset_autoscan(device);
@@ -1698,6 +1700,9 @@ static void p2p_find_callback(int result, GSupplicantInterface *interface,
DBG("result %d wifi %p", result, wifi);
+ if (!wifi)
+ goto error;
+
if (wifi->p2p_find_timeout) {
g_source_remove(wifi->p2p_find_timeout);
wifi->p2p_find_timeout = 0;
@@ -2512,6 +2517,9 @@ static void p2p_support(GSupplicantInterface *interface)
DBG("");
+ if (!interface)
+ return;
+
if (!g_supplicant_interface_has_p2p(interface))
return;
@@ -2814,6 +2822,9 @@ static void peer_changed(GSupplicantPeer *peer, GSupplicantPeerState state)
DBG("ident: %s", identifier);
+ if (!wifi)
+ return;
+
connman_peer = connman_peer_get(wifi->device, identifier);
if (!connman_peer)
return;
--
1.9.1
5 years, 1 month
[PATCH v3 0/2] wifi: p2p: Improvements on p2p and peer handling
by John Ernberg
From: John Ernberg <john.ernberg(a)actia.se>
Addresses all the new comments from review.
John Ernberg (2):
wifi: p2p: Fix several unref of NULL pointer.
wifi: p2p: Remove peers when technology is disabled.
plugins/wifi.c | 50 +++++++++++++++++++++++++++++++++++++++++---------
1 file changed, 41 insertions(+), 9 deletions(-)
--
1.9.1
5 years, 1 month
[PATCH v2 0/2] wifi: p2p: Improvements on p2p and peer handling
by John Ernberg
From: John Ernberg <john.ernberg(a)actia.se>
Here is a new patch-set addressing the issues mentioned in the review.
This patch-set improves stability of Connman in p2p context.
John Ernberg (2):
wifi: p2p: Fix several unref of NULL pointer.
wifi: p2p: Remove peers when technology is disabled.
plugins/wifi.c | 94 +++++++++++++++++++++++++++++++++++++++++++++-------------
1 file changed, 73 insertions(+), 21 deletions(-)
--
1.9.1
5 years, 1 month
DHCP renewal failure
by Naveen Singh
Hi All
In case of DHCP server not being available and eventually device failing to
renew its IP address, I am observing following:
1. Connman service state is left to online.
2. Although the connman_ipconfig structure entries for ipv4 address is
cleared out, connman never generated service property changed event. This
probably is because DHCP renewal process never feeds back to service state
machine from where we generate these events. At this point if we run
connmanctl, for ipv4 configuration it will still show the old IP address.
3. I am not sure how IPV4LL would be handled.
Not sure if we can do anything for 1 or not as connman service state is an
OR of ipv4 service state and ipv6 service state. But for sure 2 looks like
an issue. Currently there is no API to indicate clearing of IP address. I
am working on a patch to have an API which would indicate generating of a
Service property changed API when IP address is set to NULL. But before
that I wanted to get the feedback on the current behavior and find out if
this is an intended behavior or a bug?
Regards
Naveen
5 years, 1 month
[PATCH 0/3] wifi: p2p: Improvements on p2p and peer handling
by John Ernberg
From: John Ernberg <john.ernberg(a)actia.se>
Hi,
Here is a set of patches that improves the stability of the p2p and peer
handling in the wifi plugin.
A couple of extra comments about the patches themselves:
0001 - 2 unref guards were omitted here and placed in patch 0003,
this to remove a dependency between patches.
0002 - This conditional just looked plain wrong to me, if it's actually
correct as it is, just drop this patch. I have not noticed any regressions
from this change.
0003 - See the note on patch 0001.
I am not sure if the patches present the best approach in dealing with the
issues, so please take this into extra consideration while reviewing the
patch-set. Thank you.
Best regards // John Ernberg
John Ernberg (3):
wifi: p2p: Fix several unref of NULL pointer.
wifi: p2p: Fix conditional for p2p driver unregister.
wifi: p2p: Remove peers when technology is disabled.
plugins/wifi.c | 114 +++++++++++++++++++++++++++++++++++++++++----------------
1 file changed, 83 insertions(+), 31 deletions(-)
--
1.9.1
5 years, 1 month
[PATCH 0/7] Implementation of simultaneous internet contexts activation
by Mylene JOSSERAND
This patchset updates and implements in ofono's plugin a simultaneous internet contexts activation per modem.
Thanks to these patches, we can create two (or more) contexts for one modem and activates them simultaneous (if the modem handles it).
It has been tested with a cinterion pxs8 for two contexts : one for QMI and another for PPP interface.
Thank you,
Best regards
Mylene JOSSERAND (7):
ofono: create a list of contexts
ofono: move some properties to context struct
ofono: move "network" property to context struct
ofono: implementation of simultaneous APNS
ofono: remove the context struct in modem one
ofono: add array parsing when contexts are added
ofono: set "powered" property according to value
plugins/ofono.c | 488 +++++++++++++++++++++++++++++++++++---------------------
1 file changed, 309 insertions(+), 179 deletions(-)
--
2.1.4
5 years, 1 month
[RFC v2 0/8] Implementation of simultaneous internet contexts activation
by Mylene JOSSERAND
This patchset updates and implements in ofono's plugin a simultaneous internet contexts activation per modem.
Thanks to these patches, we can create two (or more) contexts for one modem and activates them simultaneous (if the modem handles it).
It has been tested with a cinterion pxs8 for two contexts : one for QMI and another for PPP interface.
This is the second version. I tried to split the best I can according to previous
comments but I think it can be improved (that is why I put it in RFC again).
Thank you in advance for patch reviews.
Mylene JOSSERAND (8):
ofono: create a list of contexts
ofono: move some properties to context struct
ofono: move "network" property to context struct
ofono: add network_context to property info
ofono: remove the context struct in modem one
ofono: implementation of simultaneous APNS
ofono: add array parsing when contexts are added
ofono: set "powered" property according to value
plugins/ofono.c | 489 +++++++++++++++++++++++++++++++++++---------------------
1 file changed, 310 insertions(+), 179 deletions(-)
--
2.1.4
5 years, 1 month
[PATCH] client: Do not add duplicate lines to history
by Jaakko Hannikainen
When issuing the same command multiple times in a row,
all instances are saved to the history. A better way to
handle is to not add anything to history if the previous
command was equal to the current one.
---
client/input.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/client/input.c b/client/input.c
index e59df8a..d462c4a 100644
--- a/client/input.c
+++ b/client/input.c
@@ -103,8 +103,9 @@ static void rl_handler(char *input)
}
if (len > 0) {
-
- add_history(input);
+ HIST_ENTRY *previous = history_get(where_history());
+ if(!previous || strcmp(previous->line, input) != 0)
+ add_history(input);
err = __connmanctl_commands(connection, trim_args, len);
--
2.6.3
5 years, 1 month
Multiple interfaces being offered the same ip address
by Usman S
Hi,
Could you please let me know how does connman handles when a connected
device offers an ip via dhcp when one of its existing interface/technology
is already configured with the same ip i.e., in case of managing multiple
technologies. Would connman decline the offer and ask for a new ip. Could
you please give me some details on this.
Thanks in advance
Best Regards,
Usman
5 years, 1 month