[PATCH 0/8] VPN property management fixes

2013-02-15 Thread Jukka Rissanen
Hi, this patchset fixes the issues described in this bug https://bugs.meego.com/show_bug.cgi?id=25965 The patch 1 will introduce a test script for getting, setting and clearing VPN property string. A new dbus method GetProperties() can be used to get all the current properties defined the the

[PATCH 1/8] test: Script for getting, setting and clearing VPN properties

2013-02-15 Thread Jukka Rissanen
--- test/vpn-property | 66 +++ 1 file changed, 66 insertions(+) create mode 100755 test/vpn-property diff --git a/test/vpn-property b/test/vpn-property new file mode 100755 index 000..2bafa1a --- /dev/null +++ b/test/vpn-property @@ -0,0

[PATCH 3/8] vpn-provider: Setting VPN properties will send PropertyChanged signal

2013-02-15 Thread Jukka Rissanen
--- vpn/vpn-provider.c | 104 + 1 file changed, 98 insertions(+), 6 deletions(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index 3abf9e3..074587a 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -39,8 +39,13 @@ #include

[PATCH 2/8] doc: Add description of GetProperties method

2013-02-15 Thread Jukka Rissanen
--- doc/vpn-connection-api.txt | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/vpn-connection-api.txt b/doc/vpn-connection-api.txt index 9faed8a..722d708 100644 --- a/doc/vpn-connection-api.txt +++ b/doc/vpn-connection-api.txt @@ -5,7 +5,14 @@ Service

[PATCH 4/8] vpn-provider: Do not send state property if state is not changed

2013-02-15 Thread Jukka Rissanen
--- vpn/vpn-provider.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index 074587a..412e316 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -1244,12 +1244,14 @@ static int provider_indicate_state(struct vpn_provider

[PATCH 6/8] vpn-provider: Allow use of Domain property name

2013-02-15 Thread Jukka Rissanen
Allow use of both VPN.Domain and Domain property strings. --- vpn/vpn-provider.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index 7694e86..a493295 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -2142,7 +2142,8 @@

[PATCH 5/8] vpn-provider: Add GetProperties method implementation

2013-02-15 Thread Jukka Rissanen
--- vpn/vpn-provider.c | 42 ++ 1 file changed, 42 insertions(+) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index 412e316..7694e86 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -96,6 +96,9 @@ struct vpn_provider { char

[PATCH 8/8] vpn-provider: SetProperty works with all properties

2013-02-15 Thread Jukka Rissanen
Fixes BMC#25965 --- vpn/vpn-provider.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index ae2d2d0..e0f1b84 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -491,8 +491,12 @@ static DBusMessage

[PATCH 7/8] vpn-provider: ClearProperty works with all properties

2013-02-15 Thread Jukka Rissanen
--- vpn/vpn-provider.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index a493295..ae2d2d0 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -513,6 +513,8 @@ static DBusMessage *clear_property(DBusConnection *conn, DBusMessage *msg,

Re: [PATCH 3/8] vpn-provider: Setting VPN properties will send PropertyChanged signal

2013-02-15 Thread Tomasz Bursztyka
Hi Jukka, enum { - USER_ROUTES_CHANGED = 0x01, + USER_ROUTES_CHANGED = 0x01, SERVER_ROUTES_CHANGED = 0x02, + TYPE_CHANGED = 0x04, + NAME_CHANGED = 0x08, + HOST_CHANGED = 0x10, + DOMAIN_CHANGED= 0x20, +

[PATCH v4 01/16] config: Remove obsolete definition

2013-02-15 Thread Jukka Rissanen
--- src/config.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/config.c b/src/config.c index 6a5b12c..686d8ce 100644 --- a/src/config.c +++ b/src/config.c @@ -68,8 +68,6 @@ static GSList *protected_services = NULL; static connman_bool_t cleanup = FALSE; -#define

[PATCH v4 00/16] VPN provisioning support

2013-02-15 Thread Jukka Rissanen
Hi, v4 - VPN config files are now in VPN_STORAGEDIR which is by default /var/lib/connman-vpn v3: - rebase against current head v2: - Split the patchset into smaller chunks as requested by Wagi - Use the new functions in inotify.c - Documentation clarifications in patch 7 - Added TODO entry to

[PATCH v4 03/16] l2tp: Fixed the nodeflate pppd option name

2013-02-15 Thread Jukka Rissanen
--- vpn/plugins/l2tp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c index 15f5128..dce0e21 100644 --- a/vpn/plugins/l2tp.c +++ b/vpn/plugins/l2tp.c @@ -107,7 +107,7 @@ struct { { L2TP.NoBSDComp, nobsdcomp, OPT_PPPD, NULL,

[PATCH v4 02/16] config: Read only wifi config

2013-02-15 Thread Jukka Rissanen
--- include/provision.h | 2 +- plugins/wifi.c | 2 +- src/config.c| 6 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/provision.h b/include/provision.h index f154d4f..d6d7c72 100644 --- a/include/provision.h +++ b/include/provision.h @@ -42,7 +42,7 @@

[PATCH v4 04/16] l2tp: Added rx and tx bps pppd options

2013-02-15 Thread Jukka Rissanen
--- vpn/plugins/l2tp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c index dce0e21..2355357 100644 --- a/vpn/plugins/l2tp.c +++ b/vpn/plugins/l2tp.c @@ -76,6 +76,8 @@ struct { } pppd_options[] = { { L2TP.User, name, OPT_ALL, NULL,

[PATCH v4 06/16] pptp: Use PPPD prefix for pppd specific options

2013-02-15 Thread Jukka Rissanen
For backward compatibility purposes, support also the PPTP prefix for PPPD options. --- vpn/plugins/pptp.c | 62 ++ 1 file changed, 44 insertions(+), 18 deletions(-) diff --git a/vpn/plugins/pptp.c b/vpn/plugins/pptp.c index 7269629..daa6ca3

[PATCH v4 07/16] doc: VPN config file specification

2013-02-15 Thread Jukka Rissanen
--- doc/vpn-config-format.txt | 215 ++ 1 file changed, 215 insertions(+) create mode 100644 doc/vpn-config-format.txt diff --git a/doc/vpn-config-format.txt b/doc/vpn-config-format.txt new file mode 100644 index 000..e8e59ac --- /dev/null +++

[PATCH v4 08/16] storage: Add function to load provider configuration file

2013-02-15 Thread Jukka Rissanen
--- Makefile.am | 4 src/connman.h | 1 + src/storage.c | 16 3 files changed, 21 insertions(+) diff --git a/Makefile.am b/Makefile.am index e3213ab..b2a9174 100644 --- a/Makefile.am +++ b/Makefile.am @@ -152,6 +152,7 @@ plugindir = $(libdir)/connman/plugins scriptdir

[PATCH v4 10/16] vpn-config: Provision providers from .config file

2013-02-15 Thread Jukka Rissanen
--- Makefile.am | 3 +- vpn/main.c | 4 + vpn/vpn-config.c | 598 +++ vpn/vpn.h| 3 + 4 files changed, 607 insertions(+), 1 deletion(-) create mode 100644 vpn/vpn-config.c diff --git a/Makefile.am b/Makefile.am index

[PATCH v4 11/16] vpn-provider: Type string in provider needs to be in lower case

2013-02-15 Thread Jukka Rissanen
--- vpn/vpn-provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index f6753b9..c80027d 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -1929,7 +1929,7 @@ int vpn_provider_set_string(struct vpn_provider *provider,

[PATCH v4 12/16] vpn-provider: Remove unprovisioned providers at startup

2013-02-15 Thread Jukka Rissanen
Check if there are any providers that were provisioned but their .config file is removed. If such providers are found, then remove the provider files from file system. --- vpn/vpn-provider.c | 80 +- 1 file changed, 79 insertions(+), 1

[PATCH v4 14/16] vpn-provider: Add extra whitespace

2013-02-15 Thread Jukka Rissanen
--- vpn/vpn-provider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index a4a1fca..2eb730a 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@ -304,7 +304,7 @@ static void set_user_networks(struct vpn_provider *provider,

[PATCH v4 15/16] TODO: Add note about removal of L2TP and PPTP prefix for PPP options

2013-02-15 Thread Jukka Rissanen
--- TODO | 10 ++ 1 file changed, 10 insertions(+) diff --git a/TODO b/TODO index 77ab29e..9926658 100644 --- a/TODO +++ b/TODO @@ -183,6 +183,16 @@ VPN Complexity: C4 Owner: Jukka Rissanen jukka.rissa...@linux.intel.com +- L2TP PPTP compatibility prefix removal + +

[PATCH v4 16/16] main: Create VPN_STORAGEDIR when starting up

2013-02-15 Thread Jukka Rissanen
Eventually all VPN directories from STORAGEDIR is to be migrated into VPN_STORAGEDIR --- vpn/main.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/vpn/main.c b/vpn/main.c index 8fd830c..d72fa74 100644 --- a/vpn/main.c +++ b/vpn/main.c @@ -273,12 +273,22 @@ int main(int argc, char

Re: [PATCH 3/8] vpn-provider: Setting VPN properties will send PropertyChanged signal

2013-02-15 Thread Jukka Rissanen
Hi Tomasz, On 15.02.2013 10:49, Tomasz Bursztyka wrote: Hi Jukka, enum { -USER_ROUTES_CHANGED = 0x01, +USER_ROUTES_CHANGED = 0x01, SERVER_ROUTES_CHANGED = 0x02, +TYPE_CHANGED = 0x04, +NAME_CHANGED = 0x08, +HOST_CHANGED = 0x10, +

[PATCH (RFC) 1/2] gresolv: Do not remove a query on failure if other results are pending

2013-02-15 Thread Tomasz Bursztyka
Fixes BMC#25973 In the case one of the resolving failed, the query is removed and destroyed from the queue. So the responses of the requests sent to the other namerservers - which might be successful - will thus be lost since they cannot be matched anymore to their initial request. ---

[PATCH 2/2] gresolv: Optimize the response parser

2013-02-15 Thread Tomasz Bursztyka
It will check first if the response belongs to a query, before interpreting any of its content (rcode, count...). --- gweb/gresolv.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gweb/gresolv.c b/gweb/gresolv.c index 9505f67..864d2ad 100644 --- a/gweb/gresolv.c