[PATCH 4/6] service: Reconfigure only the changed IPv4 or IPv6 configuration

2013-05-17 Thread Patrik Flykt
If the new IP configuration parameters were successfully applied, the old IP configuration has been torn down and the service is not connected anymore. Only update the changed IP configuration. Fixes BMC#26004 --- src/service.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-)

[PATCH 0/6] Reconfiguration of IP metods

2013-05-17 Thread Patrik Flykt
Hi, This patch set fixes BMC#26004 by properly restarting DHCP negotiations for a connected service. In order to achieve this, the first thing to remove is the extra check in set_connected(). The check has been done by both calling functions already, so no functionality is lost at this

[PATCH 1/6] network: Remove unnecessary check

2013-05-17 Thread Patrik Flykt
The check for a network being connected is done already by the callers. --- src/network.c |3 --- 1 file changed, 3 deletions(-) diff --git a/src/network.c b/src/network.c index 6a926cb..0736068 100644 --- a/src/network.c +++ b/src/network.c @@ -574,9 +574,6 @@ static void

[PATCH 3/6] network: Use the already existing network connecting function

2013-05-17 Thread Patrik Flykt
User the already existing set_connected() network connection function instead of duplicating code. Remove a static function in the progress. --- src/network.c | 38 -- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/src/network.c

[PATCH 6/6] service: Rename function to __connman_service_set_ipconfig()

2013-05-17 Thread Patrik Flykt
The function is more about creating a new ipconfig from a D-Bus message than resetting it, thus rename the function to better convey its intended usage. With a NULL D-Bus message iterator, the default IP configuration is applied achieving reset functionality. --- src/config.c |4 ++--

[PATCH 2/6] network: Rename function to better describe what it does

2013-05-17 Thread Patrik Flykt
Rename __connman_network_set_ipconfig() to __connman_network_reconfigure_ipconfig() and make a check that the network is connected or connecting. This function is used when updating connected or connecting network IP configuration. --- src/connman.h |2 +- src/network.c |7 +--

[PATCH 5/6] service: Only return error if creating new ipconfig fails

2013-05-17 Thread Patrik Flykt
Since the existing code updates service ipconfigs only when the new settings are properly formatted, it is enough to simply return the error if updating fails. --- src/service.c |8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/service.c b/src/service.c index

Re: [PATCH 3/6] network: Use the already existing network connecting function

2013-05-17 Thread Daniel Wagner
Hi Patrik, On 05/17/2013 09:00 AM, Patrik Flykt wrote: - if (ipconfig_ipv6) { + if (ipconfig_ipv6 != NULL) { method = __connman_ipconfig_get_method(ipconfig_ipv6); switch (method) { case CONNMAN_IPCONFIG_METHOD_UNKNOWN:

[PATCH v2] wifi: scan all stored hidden networks relevantly

2013-05-17 Thread Tomasz Bursztyka
Currently a scan will only scan the first found stored hidden network. This patch fixes it: it will scan all, taking into account the limit of scan parameters the driver can take. Thanks to Jukka for testing this. --- 1 memory leak and 1 invalid read fixed. I simplified how frequencies are

Re: [PATCH v3 11/12] session_policy_local: Set session identification method

2013-05-17 Thread Daniel Wagner
Hi Patrik, On 05/16/2013 01:21 PM, Patrik Flykt wrote: @@ -173,12 +174,18 @@ static void finish_create(struct policy_config *policy, group = g_hash_table_lookup(selinux_hash, policy-selinux); if (group != NULL) { set_policy(policy, group); + +

Re: [PATCH 3/6] network: Use the already existing network connecting function

2013-05-17 Thread Patrik Flykt
On Fri, 2013-05-17 at 10:18 +0200, Daniel Wagner wrote: Hi Patrik, On 05/17/2013 09:00 AM, Patrik Flykt wrote: - if (ipconfig_ipv6) { + if (ipconfig_ipv6 != NULL) { method = __connman_ipconfig_get_method(ipconfig_ipv6); switch (method) { case

[PATCH] README: update information about wpa_supplicant built config

2013-05-17 Thread Tomasz Bursztyka
--- README | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README b/README index bfb246a..4ad0e83 100644 --- a/README +++ b/README @@ -274,14 +274,21 @@ CONFIG_WPS=y CONFIG_AP=y CONFIG_CTRL_IFACE_DBUS_NEW=y -and, add: +add: CONFIG_BGSCAN_SIMPLE=y This

[PATCH v4 00/12] Add UID/GID support to session policies

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de Hi [v4 has only one change compared to v3. Patch #3 and patch #11 do call session_update() only when something has changed.] 01 session: Add session argument to create_service_entry_cb 02 session: Do not access stale entry pointers While I was

[PATCH v4 01/12] session: Add session argument to create_service_entry_cb

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de We need to remembrer which session this struct service_entry belongs to when removing the entries again. --- src/connman.h | 1 + src/service.c | 4 ++-- src/session.c | 8 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git

[PATCH v4 04/12] session_policy_local: Refactor SELinux context parser

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de g_strplit() will eventually strdup the tokens so no need to strdup() 'context'. But we an ugly cast (from 'const unsigned char *' to 'const char *') is needed for g_strsplit() to make the compiler happy. --- plugins/session_policy_local.c | 21

[PATCH v4 02/12] session: Do not access stale entry pointers

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de When removing the entry we need to clear all references towoards it. --- src/session.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/session.c b/src/session.c index c31fa6c..455f249 100644 ---

[PATCH v4 03/12] session_policy_local: Do not handle small allocation

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de Let's remove the small allocations error path because glib will abort on memory exhausting anyway. Basically we remove dead code. --- plugins/session_policy_local.c | 33 - 1 file changed, 4 insertions(+), 29

[PATCH v4 05/12] session_policy_local: Update session before unref policy

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de The update flag indicates if the policy is still valid after the unref. That is when a session is using the policy and the corresponding file is removed. Just update before unref policy. --- plugins/session_policy_local.c | 14 -- 1 file

[PATCH v4 07/12] session_policy_local: Rework policy file handling

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de The old assumption was that a config file is associtated with one session only. With introducing UID/GID support a policy might be used for several sessions. Furthermore, it was assumed that the file name is the key/ident to identify a session and a

[PATCH v4 08/12] session_policy_local: Remove struct create_data

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de Instead we use struct policy_data from the beginning. --- plugins/session_policy_local.c | 43 ++ 1 file changed, 14 insertions(+), 29 deletions(-) diff --git a/plugins/session_policy_local.c

[PATCH v4 11/12] session_policy_local: Set session identification method

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de For SELinux we need to store the complete context for iptables to work. --- plugins/session_policy_local.c | 44 +- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/plugins/session_policy_local.c

[PATCH v4 12/12] session-test: Add tests for session_policy_local

2013-05-17 Thread Daniel Wagner
From: Daniel Wagner daniel.wag...@bmw-carit.de Use the UID as identification. --- tools/session-test.c | 151 +++ 1 file changed, 151 insertions(+) diff --git a/tools/session-test.c b/tools/session-test.c index c296b95..ac91894 100644 ---

[PATCH v2] README: update information about wpa_supplicant built config

2013-05-17 Thread Tomasz Bursztyka
--- Small typo fixed README | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README b/README index bfb246a..161c535 100644 --- a/README +++ b/README @@ -274,14 +274,21 @@ CONFIG_WPS=y CONFIG_AP=y CONFIG_CTRL_IFACE_DBUS_NEW=y -and, add: +add:

Re: [PATCH v2] README: update information about wpa_supplicant built config

2013-05-17 Thread Patrik Flykt
On Fri, 2013-05-17 at 14:45 +0300, Tomasz Bursztyka wrote: --- Small typo fixed Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman

Re: [PATCH v2] wifi: scan all stored hidden networks relevantly

2013-05-17 Thread Patrik Flykt
On Fri, 2013-05-17 at 11:26 +0300, Tomasz Bursztyka wrote: Currently a scan will only scan the first found stored hidden network. This patch fixes it: it will scan all, taking into account the limit of scan parameters the driver can take. Thanks to Jukka for testing this. Applied, thanks!

Re: [PATCH] TODO: DHCPv6 DECLINE message support

2013-05-17 Thread Patrik Flykt
On Thu, 2013-05-16 at 12:22 +0300, Jukka Rissanen wrote: --- TODO | 6 ++ 1 file changed, 6 insertions(+) Applied, thanks! Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman