[PATCH] gsupplicant: Use the righs dbus helper when adding a fixed array in a dict

2012-05-08 Thread Tomasz Bursztyka
Fixes BMC#25120 --- gsupplicant/supplicant.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index 2c1a928..dd1502f 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -2966,9 +2966,8 @@ static void

Re: [PATCH] gsupplicant: Fixing a possible memory leak when disconnecting

2012-05-08 Thread Patrik Flykt
On Mon, 2012-05-07 at 10:21 +0300, Tomasz Bursztyka wrote: --- Hi, A quick fix. In case of disconnecting a WPS connected network, we don't free the data which is wrong. Patch has been applied, thanks a lot! Patrik ___ connman mailing

Re: [PATCH] wifi: Set disconnecting flag to a relevant value when disconnected

2012-05-08 Thread Patrik Flykt
On Mon, 2012-05-07 at 16:48 +0300, Tomasz Bursztyka wrote: --- Hi, Such patch is I think fixing the disconnecting flag issue the proper way. Patch applied, thanks! Patrik ___ connman mailing list connman@connman.net

Re: [PATCH v1] ofono: Check for CM attached before registering network

2012-05-08 Thread Patrik Flykt
On Mon, 2012-05-07 at 15:22 +0200, Daniel Wagner wrote: From: Daniel Wagner daniel.wag...@bmw-carit.de We need to check if the ConnectionManager attached signal before we are allowed to connect to the gprs context: Patch has been applied, thanks a lot! Patrik

Re: [PATCH] gsupplicant: Use the righs dbus helper when adding a fixed array in a dict

2012-05-08 Thread Patrik Flykt
On Tue, 2012-05-08 at 11:23 +0300, Tomasz Bursztyka wrote: Fixes BMC#25120 Patch applied, thanks a lot! Patrik ___ connman mailing list connman@connman.net http://lists.connman.net/listinfo/connman

Re: [PATCH] wifi: do not remove networks when autoscan fails

2012-05-08 Thread Tomasz Bursztyka
Hi Julien, NACK to your patch. Without this patch ConnMan removes all non discovered networks even if the scan is not complete. What do you mean by removes all non discovered networks? As I undestand this, it cannot be possible: a non discovered networks = a non existing network object in

[PATCH] provider: Fix network/netmask parsing and potential crash

2012-05-08 Thread patrik . flykt
From: Patrik Flykt patrik.fl...@linux.intel.com --- After staring at the code for a while, I and Jukka noticed we'll need some more checking in place. With the changes below, netmask is set to 32 if not given. src/provider.c | 19 --- 1 file changed, 16 insertions(+), 3

Re: [PATCH] connection: Fix host route to VPN server

2012-05-08 Thread Jukka Rissanen
Hi Daniel, I could not test the cellular + VPN combination but at least this one did not break the non P-t-P VPN case so ACK from me. Cheers, Jukka On 05/07/2012 06:31 PM, Daniel Wagner wrote: From: Daniel Wagnerdaniel.wag...@bmw-carit.de The kernel will ignore host routes which are

[PATCH v2] provider: Fix network/netmask parsing and potential crash

2012-05-08 Thread patrik . flykt
From: Patrik Flykt patrik.fl...@linux.intel.com --- After staring at the code for a while, I and Jukka noticed we'll need some more checking in place. With the changes below, netmask is set to 32 if not given. And of course the *netmask = NULL assignment can be removed too. src/provider.c |

Re: [PATCH v2] provider: Fix network/netmask parsing and potential crash

2012-05-08 Thread Patrik Flykt
On Tue, 2012-05-08 at 14:52 +0300, patrik.fl...@linux.intel.com wrote: From: Patrik Flykt patrik.fl...@linux.intel.com --- After staring at the code for a while, I and Jukka noticed we'll need some more checking in place. With the changes below, netmask is set to 32 if not given. And of

[PATCH] detect: Fix detect_dellink to destruct device when Wi-Fi is scanning

2012-05-08 Thread Danny Jeongseok Seo
From: Danny Jeongseok Seo s@samsung.com --- After Wi-Fi scan, detect_dellink() cannot process device_destruct() because device is still made a reference. So this patch can check __connman_device_reset_scanning() and deal with connman_device_unref() correctly. I had fully tested with

[PATCH] detect: Fix detect_dellink to destruct device when Wi-Fi is scanning

2012-05-08 Thread Danny Jeongseok Seo
From: Danny Jeongseok Seo s@samsung.com --- After Wi-Fi scan, detect_dellink() cannot process device_destruct() because device is still made a reference. So this patch can check __connman_device_reset_scanning() and deal with connman_device_unref() correctly. src/detect.c |5 + 1

Re: [PATCH] detect: Fix detect_dellink to destruct device when Wi-Fi is scanning

2012-05-08 Thread Patrik Flykt
Hi, On Tue, 2012-05-08 at 22:05 +0900, Danny Jeongseok Seo wrote: After Wi-Fi scan, detect_dellink() cannot process device_destruct() because device is still made a reference. So this patch can check __connman_device_reset_scanning() and deal with connman_device_unref() correctly.

[PATCH] connection.c: Fix possible NULL dereference __connman_connection_gateway_add

2012-05-08 Thread Adrien Bustany
From: Adrien Bustany adrien.bust...@nokia.com --- src/connection.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/connection.c b/src/connection.c index f4abd57..c212ea6 100644 --- a/src/connection.c +++ b/src/connection.c @@ -844,18 +844,20 @@ int

Re: Release of ConnMan 0.85

2012-05-08 Thread Marcel Holtmann
Hi Tim, I am more than happy to announce the ConnMan 0.85 release. This will be our last 0.x release. The API has been extensively reviewed and we consider it stable now. I have just tested it an have taken a look at the dbus signals. As far as i see there is no signal wich is can only

Re: [PATCH] connection.c: Fix possible NULL dereference __connman_connection_gateway_add

2012-05-08 Thread Jukka Rissanen
Hi Adrien, ACK with modifications to the subject, should probably say something like connection: Fix possible NULL dereference Cheers, Jukka On 05/08/2012 05:26 PM, Adrien Bustany wrote: From: Adrien Bustanyadrien.bust...@nokia.com --- src/connection.c | 34

Re: [PATCH] connection: Fix host route to VPN server

2012-05-08 Thread Marcel Holtmann
Hi Daniel, The kernel will ignore host routes which are bogus. In case of a PtP connection such as PPP for cellular the gateway address should not be used. --- src/connection.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) patch has been applied. Regards

Re: [PATCH] connection.c: Fix possible NULL dereference __connman_connection_gateway_add

2012-05-08 Thread Marcel Holtmann
Hi Adrien, --- src/connection.c | 34 +++--- 1 files changed, 19 insertions(+), 15 deletions(-) patch has been applied. Regards Marcel ___ connman mailing list connman@connman.net

[PATCH] oFono: Initialize prefix_length

2012-05-08 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de We could end up calling connman_ipaddress_set_ipv6() withouth prefix_lenght initialized. Reported by hdante. --- plugins/ofono.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index

[PATCH] gsupplicant: Use the righs dbus helper when adding a fixed array in a dict

2012-05-08 Thread All franck
Hi, I have tried your patch, there's no crash anymore but the parameters provided to wpa_supplicant does not seem correct The passphrase was changed using python script that call service-SetProperty API [root@localhost ~]#c2 edit Telecom-56652500 passphrase

Static analysis errors

2012-05-08 Thread Henrique Dante
Hello, I'm sending the error reports here, as suggested in #connman. There were 8 issues, 1 of them already solved (plugins/ofono.c). Here are the other 7: Logic error Dereference of null pointer gdhcp /client.c 1933 http://people.profusion.mobi/~hdante/connman/report-nynAB9.html Logic error

[PATCH 01/20] wifi: Fix NULL ssid being passed to memcmp

2012-05-08 Thread Henrique Dante de Almeida
--- plugins/wifi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/wifi.c b/plugins/wifi.c index c303b6e..89576b3 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -1551,7 +1551,7 @@ static void network_added(GSupplicantNetwork *supplicant_network) if

[PATCH 00/20] Fix many static analysis problems

2012-05-08 Thread Henrique Dante de Almeida
Those were the trivial problems caught with clang static analyzer, plus the plugins/ofono.c fix described by wagi. Henrique Dante de Almeida (20): wifi: Fix NULL ssid being passed to memcmp dhcpv6: fix null pointer dereference on memory allocation failure dhcp: fix null pointer dereference

[PATCH 02/20] dhcpv6: fix null pointer dereference on memory allocation failure

2012-05-08 Thread Henrique Dante de Almeida
--- src/dhcpv6.c | 113 -- 1 files changed, 62 insertions(+), 51 deletions(-) diff --git a/src/dhcpv6.c b/src/dhcpv6.c index bf764c8..f0889ac 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -278,25 +278,28 @@ static void

[PATCH 03/20] dhcp: fix null pointer dereference on memory allocation failure

2012-05-08 Thread Henrique Dante de Almeida
--- src/dhcp.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dhcp.c b/src/dhcp.c index b267074..ab8c464 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -283,7 +283,8 @@ static void lease_available_cb(GDHCPClient *dhcp_client, gpointer user_data)

[PATCH 04/20] ofono: fix uninitialized value

2012-05-08 Thread Henrique Dante de Almeida
--- plugins/ofono.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index 0dfadb8..22f1891 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -43,8 +43,6 @@ #include mcc.h -#define uninitialized_var(x) x = x - #define

[PATCH 05/20] gdhcp: remove assignment that's never used

2012-05-08 Thread Henrique Dante de Almeida
--- gdhcp/client.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index b9f8da6..b61d5a4 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -1126,7 +1126,6 @@ static int ipv4ll_recv_arp_packet(GDHCPClient *dhcp_client) int

[PATCH 06/20] gdhcp: remove dead assignment

2012-05-08 Thread Henrique Dante de Almeida
--- gdhcp/client.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index b61d5a4..c308b83 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -1852,7 +1852,7 @@ static gboolean listener_event(GIOChannel *channel, GIOCondition condition,

[PATCH 07/20] gsupplicant: remove dead assignment

2012-05-08 Thread Henrique Dante de Almeida
--- gsupplicant/supplicant.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c index dd1502f..977c0fb 100644 --- a/gsupplicant/supplicant.c +++ b/gsupplicant/supplicant.c @@ -2452,7 +2452,6 @@ static void

[PATCH 08/20] ofono: fix uninitialized variable

2012-05-08 Thread Henrique Dante de Almeida
--- plugins/ofono.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index 22f1891..64296e6 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -1060,7 +1060,7 @@ static void remove_network(struct modem_data *modem) static int

[PATCH 09/20] vpn: fix null pointer dereference

2012-05-08 Thread Henrique Dante de Almeida
--- plugins/vpn.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/vpn.c b/plugins/vpn.c index ada15aa..e442306 100644 --- a/plugins/vpn.c +++ b/plugins/vpn.c @@ -351,9 +351,12 @@ static int vpn_connect(struct connman_provider *provider)

[PATCH 10/20] vpn: fix null pointer dereference

2012-05-08 Thread Henrique Dante de Almeida
--- plugins/vpn.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/vpn.c b/plugins/vpn.c index e442306..165c325 100644 --- a/plugins/vpn.c +++ b/plugins/vpn.c @@ -162,10 +162,12 @@ vpn_exit:

[PATCH 11/20] dnsproxy: return error if initial send fails

2012-05-08 Thread Henrique Dante de Almeida
--- src/dnsproxy.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 5404348..4e08d1c 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -1443,6 +1443,8 @@ static int ns_resolv(struct server_data *server, struct request_data *req,

[PATCH 12/20] dnsproxy: remove dead assignment

2012-05-08 Thread Henrique Dante de Almeida
--- src/dnsproxy.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 4e08d1c..d1f5e9c 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -1201,7 +1201,6 @@ static int reply_query_type(unsigned char *msg, int len) /* now the

[PATCH 13/20] iptables: remove dead assignment

2012-05-08 Thread Henrique Dante de Almeida
--- src/iptables.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/iptables.c b/src/iptables.c index 7b0e25d..531e933 100644 --- a/src/iptables.c +++ b/src/iptables.c @@ -1526,7 +1526,7 @@ static int iptables_command(int argc, char *argv[]) insert = FALSE;

[PATCH 14/20] rtnl: remove dead assignment

2012-05-08 Thread Henrique Dante de Almeida
--- src/rtnl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/rtnl.c b/src/rtnl.c index e53f5e8..1aaef29 100644 --- a/src/rtnl.c +++ b/src/rtnl.c @@ -1189,7 +1189,7 @@ static const char **rtnl_nd_opt_dnssl(struct nd_opt_hdr *opt, guint32 *lifetime) static void

[PATCH 15/20] wispr: remove dead assignment

2012-05-08 Thread Henrique Dante de Almeida
--- src/wispr.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/wispr.c b/src/wispr.c index 4fe9e75..d43763d 100644 --- a/src/wispr.c +++ b/src/wispr.c @@ -386,7 +386,7 @@ static void xml_wispr_parser_callback(const char *str, gpointer user_data) result =

[PATCH 16/20] iptables-test: remove dead assignment

2012-05-08 Thread Henrique Dante de Almeida
--- tools/iptables-test.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/iptables-test.c b/tools/iptables-test.c index 9fba23e..881fa0b 100644 --- a/tools/iptables-test.c +++ b/tools/iptables-test.c @@ -1516,7 +1516,7 @@ int main(int argc, char *argv[])

[PATCH 18/20] supplicant: remove dead assignments

2012-05-08 Thread Henrique Dante de Almeida
--- tools/supplicant.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/tools/supplicant.c b/tools/supplicant.c index fd00114..1c96823 100644 --- a/tools/supplicant.c +++ b/tools/supplicant.c @@ -894,8 +894,6 @@ static void extract_rsn(struct supplicant_bss *bss,

[PATCH 19/20] wispr: remove dead assignment

2012-05-08 Thread Henrique Dante de Almeida
--- tools/wispr.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/wispr.c b/tools/wispr.c index 69ee871..122bea5 100644 --- a/tools/wispr.c +++ b/tools/wispr.c @@ -290,7 +290,7 @@ static void parser_callback(const char *str, gpointer user_data) result =

[PATCH 20/20] ofono: fix uninitialized variable

2012-05-08 Thread Henrique Dante de Almeida
--- plugins/ofono.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index 64296e6..ae419be 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -832,7 +832,7 @@ static void extract_ipv6_settings(DBusMessageIter *array, {

Re: [PATCH 20/20] ofono: fix uninitialized variable

2012-05-08 Thread Ulisses Furquim
Hi Henrique, On Tue, May 8, 2012 at 4:21 PM, Henrique Dante de Almeida hda...@profusion.mobi wrote: ---  plugins/ofono.c |    2 +-  1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/plugins/ofono.c b/plugins/ofono.c index 64296e6..ae419be 100644 --- a/plugins/ofono.c +++