Re: Pre-configuring an ethernet interface

2013-01-11 Thread Justin Maggard
On Fri, Jan 11, 2013 at 5:36 AM, Bach, Pascal wrote: > > > Just to be sure: all of you above want to provision/configure static > > IPv4 (or IPv6) addresses before the ethernet cable is connected, right? > > > > Provision is the most important use case for me. But I think there are two > ways prov

Re: Pre-configuring an ethernet interface

2013-01-11 Thread Jack Mitchell
On 11/01/13 13:36, Bach, Pascal wrote: Just to be sure: all of you above want to provision/configure static IPv4 (or IPv6) addresses before the ethernet cable is connected, right? Provision is the most important use case for me. But I think there are two ways provision could be done. 1. Pro

Can't connect to VPN

2013-01-11 Thread Yevhen Kyriukha
Hi! Could anyone help me with configuring VPN, I can't get it work. I'm using connman v1.10. I created settings for my VPN connection in /var/lib/connman directory. I want connman to bring VPN connection automatically at boot time. But connman-vpn daemon doesn't see config files: when I run "vpn

RE: Pre-configuring an ethernet interface

2013-01-11 Thread Bach, Pascal
> Just to be sure: all of you above want to provision/configure static > IPv4 (or IPv6) addresses before the ethernet cable is connected, right? > Provision is the most important use case for me. But I think there are two ways provision could be done. 1. Provide a default configuration .config

Re: [PATCH] gweb: Make sure to destroy the lookup before calling any result function

2013-01-11 Thread Patrik Flykt
On Fri, 2013-01-11 at 14:37 +0200, Tomasz Bursztyka wrote: > Program received signal SIGSEGV, Segmentation fault. > Backtrace: > 0 0x004219fe in _debug (resolv=0x75f9a0, file=0x497267 > "gweb/gresolv.c", > caller=0x497598 "destroy_lookup", > format=0x497278 "lookup %p id %d ipv4 %

Re: [PATCH v2] gsupplicant: Return max SSIDs to scan given by wpa_supplicant

2013-01-11 Thread Patrik Flykt
On Fri, 2013-01-11 at 14:37 +0200, patrik.fl...@linux.intel.com wrote: > From: Patrik Flykt > > Although it seems wpa_supplicant can handle 4 SSIDs in version 0.7.x > and 16 starting with 0.8.x, in practise this does not work. Return the > value reported without relying on wpa_supplicant internal

[PATCH v2] gsupplicant: Return max SSIDs to scan given by wpa_supplicant

2013-01-11 Thread patrik . flykt
From: Patrik Flykt Although it seems wpa_supplicant can handle 4 SSIDs in version 0.7.x and 16 starting with 0.8.x, in practise this does not work. Return the value reported without relying on wpa_supplicant internals to handle the situation. In order for hidden scans to work properly, the minimu

[PATCH] gweb: Make sure to destroy the lookup before calling any result function

2013-01-11 Thread Tomasz Bursztyka
Program received signal SIGSEGV, Segmentation fault. Backtrace: 0 0x004219fe in _debug (resolv=0x75f9a0, file=0x497267 "gweb/gresolv.c", caller=0x497598 "destroy_lookup", format=0x497278 "lookup %p id %d ipv4 %p ipv6 %p") at gweb/gresolv.c:136 1 0x00421ac5 in destroy_look

Re: [PATCH 1/3] ipconfig: Add checks for invalid IPv4/IPv6 addresses

2013-01-11 Thread Jukka Rissanen
Hi, On 11.01.2013 13:38, patrik.fl...@linux.intel.com wrote: From: Patrik Flykt Also check which methods are supposed to have IP addresses set. --- src/ipconfig.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ipconfig.c b/src/ipconfig.c inde

Re: Pre-configuring an ethernet interface

2013-01-11 Thread Patrik Flykt
On Fri, 2013-01-11 at 11:56 +, Jack Mitchell wrote: > In this case, I have a program that runs over a serial port which can > configure > the ethernet. The user may want to pre-configure the device over > serial, > before > installing it on-site. Just to be sure: all of you above want to pro

Re: Pre-configuring an ethernet interface

2013-01-11 Thread Jack Mitchell
On 11/01/13 11:43, Patrik Flykt wrote: Hi, On Fri, 2013-01-11 at 11:19 +0200, Jukka Rissanen wrote: implement provisioning support i.e., .config file support for ethernet devices This would be the way to go for pre-configuration of ethernet services. Connecting an ethernet cable gives

Re: Pre-configuring an ethernet interface

2013-01-11 Thread Patrik Flykt
Hi, On Fri, 2013-01-11 at 11:19 +0200, Jukka Rissanen wrote: > implement provisioning support i.e., .config file > support for ethernet devices This would be the way to go for pre-configuration of ethernet services. Connecting an ethernet cable gives a fully connected ethernet service

[PATCH 3/3] service: Validate the IP addresses before use

2013-01-11 Thread patrik . flykt
From: Patrik Flykt When setting IP address information via D-Bus, first create a new ipconfig structure to hold the values. If the values were validated correctly, update the service ipconfig structure with the new values. Done this way, the current IP configuration is unaffected if erroneous val

[PATCH 2/3] service: Factor out ipconfig creation

2013-01-11 Thread patrik . flykt
From: Patrik Flykt The caller has to set the created ipconfig into its data structures. --- src/service.c | 58 + 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/src/service.c b/src/service.c index 5845453..106da04 100644

[PATCH 1/3] ipconfig: Add checks for invalid IPv4/IPv6 addresses

2013-01-11 Thread patrik . flykt
From: Patrik Flykt Also check which methods are supposed to have IP addresses set. --- src/ipconfig.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ipconfig.c b/src/ipconfig.c index 7fba53b..9c7e735 100644 --- a/src/ipconfig.c +++ b/src/ipconfig.

[PATCH 0/3] Fix invalid IP addresses

2013-01-11 Thread patrik . flykt
From: Patrik Flykt Hi, This patch set fixes the code to first validate the IP addresses given via D-Bus before attempting to use them. Please review, Patrik Patrik Flykt (3): ipconfig: Add checks for invalid IPv4/IPv6 addresses service: Factor out ipconfig creation servi

Re: Pre-configuring an ethernet interface

2013-01-11 Thread Jukka Rissanen
Hi all, On 11.01.2013 11:07, Bach, Pascal wrote: Hello I'm looking to use connman as the network manager for a small NAS device. The device could have a wireless adapter, and one or two ethernet adapters. I'd like to be able to show the user all the network interfaces on the box, and allow

RE: Pre-configuring an ethernet interface

2013-01-11 Thread Bach, Pascal
Hello > I'm looking to use connman as the network manager for a small NAS > device. > The device could have a wireless adapter, and one or two ethernet > adapters. I'd like to be able to show the user all the network > interfaces > on the box, and allow them to configure them with or without a

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

2013-01-11 Thread Jukka Rissanen
--- TODO | 10 ++ 1 file changed, 10 insertions(+) diff --git a/TODO b/TODO index b81a41d..dfb018c 100644 --- a/TODO +++ b/TODO @@ -189,6 +189,16 @@ VPN Complexity: C4 Owner: Jukka Rissanen +- L2TP & PPTP compatibility prefix removal + + Priority: Medium + Complexity: C1 +

[PATCH v3 14/15] vpn-provider: Add extra whitespace

2013-01-11 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, GSLis

[PATCH v3 13/15] vpn-provider: Add route support in vpn config file

2013-01-11 Thread Jukka Rissanen
--- vpn/vpn-provider.c | 84 -- vpn/vpn.h | 3 +- 2 files changed, 78 insertions(+), 9 deletions(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index 6750d6b..a4a1fca 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c @@

[PATCH v3 12/15] vpn-provider: Remove unprovisioned providers at startup

2013-01-11 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 deletion(-

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

2013-01-11 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 v3 10/15] vpn-config: Provision providers from .config file

2013-01-11 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 26

[PATCH v3 09/15] vpn-provider: Initial .config file support

2013-01-11 Thread Jukka Rissanen
--- vpn/vpn-provider.c | 152 +++-- vpn/vpn.h | 5 ++ 2 files changed, 140 insertions(+), 17 deletions(-) diff --git a/vpn/vpn-provider.c b/vpn/vpn-provider.c index 56a9c51..f6753b9 100644 --- a/vpn/vpn-provider.c +++ b/vpn/vpn-provider.c

[PATCH v3 07/15] doc: VPN config file specification

2013-01-11 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..d6afcb5 --- /dev/null +++ b/do

[PATCH v3 08/15] storage: Add function to load provider configuration file

2013-01-11 Thread Jukka Rissanen
--- src/connman.h | 1 + src/storage.c | 16 2 files changed, 17 insertions(+) diff --git a/src/connman.h b/src/connman.h index 95e5c8a..49eafd3 100644 --- a/src/connman.h +++ b/src/connman.h @@ -206,6 +206,7 @@ int __connman_storage_save_global(GKeyFile *keyfile); void __connm

[PATCH v3 06/15] pptp: Use PPPD prefix for pppd specific options

2013-01-11 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 100

[PATCH v3 05/15] l2tp: Use PPPD prefix for pppd specific options

2013-01-11 Thread Jukka Rissanen
For backward compatibility purposes, support also the L2TP prefix for PPPD options. --- vpn/plugins/l2tp.c | 68 +- 1 file changed, 47 insertions(+), 21 deletions(-) diff --git a/vpn/plugins/l2tp.c b/vpn/plugins/l2tp.c index 2355357..e0b2b04 100

[PATCH v3 04/15] l2tp: Added rx and tx bps pppd options

2013-01-11 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, OPT_ST

[PATCH v3 03/15] l2tp: Fixed the nodeflate pppd option name

2013-01-11 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, O

[PATCH v3 02/15] config: Read only wifi config

2013-01-11 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 @@ s

[PATCH v3 01/15] config: Remove obsolete definition

2013-01-11 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 INTERNAL_CONFIG_PRE

[PATCH v3 00/15] VPN provisioning support

2013-01-11 Thread Jukka Rissanen
Hi, I can send patches 01, 03, 04, 14 separately if necessary but currently they are in this set although they mostly fix some minor issues. v3: - rebase against current head v2: - Split the patchset into smaller chunks as requested by Wagi - Use the new functions in inotify.c - Documentation cl

Re: Pre-configuring an ethernet interface

2013-01-11 Thread Justin Maggard
Hi Patrik, On Thu, Jan 10, 2013 at 11:02 PM, Patrik Flykt wrote: > On Wed, 2013-01-09 at 18:07 -0800, Justin Maggard wrote: > > Personally, it doesn't matter to me if it's in the service list, or in > > some > > other list. All I really want to do is find which interfaces connman > > is > > con

Re: dnsproxy signaling

2013-01-11 Thread Patrik Flykt
Hi, On Thu, 2012-12-27 at 08:10 +1000, Lorn Potter wrote: > Just wondering if there are any dbus signals to be had when there is no > connection and something makes a request? > > i.e. > > (no connection) > user tries to opens link -> udp_listener_event -> parse_request -> > send_res