Re: [PATCH 4/4] service: Taking last error into acount when retrying to connect

2012-05-23 Thread Jukka Rissanen
Hi Tomasz, On 05/23/2012 03:01 PM, Tomasz Bursztyka wrote: This is usefull for requesting again a new passphrase, once the previous one proved to be bogus. This works only for favorite services. --- src/service.c | 26 +- 1 files changed, 21 insertions(+), 5

[PATCH 1/2] config: Remove unused function

2012-05-28 Thread Jukka Rissanen
--- src/config.c | 56 1 files changed, 0 insertions(+), 56 deletions(-) diff --git a/src/config.c b/src/config.c index 66e1316..ba46366 100644 --- a/src/config.c +++ b/src/config.c @@ -461,62 +461,6 @@ static struct connman_config

[PATCH 0/2] Remove obsolete functions

2012-05-28 Thread Jukka Rissanen
Hi, I noticed some unused functions that nobody calls so they are clearly not needed. Cheers, Jukka Jukka Rissanen (2): config: Remove unused function storage: Remove obsolete functions that nobody calls src/config.c | 56 src

[PATCH 2/2] storage: Remove obsolete functions that nobody calls

2012-05-28 Thread Jukka Rissanen
Config load and save functions are not called so they are not needed. --- src/connman.h |2 -- src/storage.c | 24 2 files changed, 0 insertions(+), 26 deletions(-) diff --git a/src/connman.h b/src/connman.h index 5ac97f9..82643cc 100644 --- a/src/connman.h +++

[PATCH 03/17] service: Add setter for config information

2012-05-28 Thread Jukka Rissanen
Save config information (file name and section id) for provisioned services. The information is used to remove the service when config file is removed. --- src/connman.h |2 ++ src/service.c | 17 + 2 files changed, 19 insertions(+), 0 deletions(-) diff --git

[PATCH 04/17] config: Remove service if config file is removed

2012-05-28 Thread Jukka Rissanen
If the user removes the config file, we disconnect and then try to remove the corresponding service directory and all known files (settings and data). --- src/config.c | 70 - 1 files changed, 49 insertions(+), 21 deletions(-) diff --git

[PATCH 05/17] config: Set config information in service

2012-05-28 Thread Jukka Rissanen
This is needed so that service can know if the config file is removed when connmand is not running. --- src/config.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/config.c b/src/config.c index f5e040e..b2f7abb 100644 --- a/src/config.c +++ b/src/config.c

[PATCH 06/17] service: Save provisioned config information

2012-05-28 Thread Jukka Rissanen
--- src/service.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/service.c b/src/service.c index eb5195f..dbc5a61 100644 --- a/src/service.c +++ b/src/service.c @@ -678,6 +678,15 @@ static int service_save(struct connman_service *service)

[PATCH 07/17] service: Remove unprovisioned services when starting connman

2012-05-28 Thread Jukka Rissanen
--- src/service.c | 62 + 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/src/service.c b/src/service.c index dbc5a61..6c8285f 100644 --- a/src/service.c +++ b/src/service.c @@ -6124,6 +6124,66 @@

[PATCH 08/17] service: Add function to set the favorite flag

2012-05-28 Thread Jukka Rissanen
Add a function that sets favorite flag but which does not touch the ordering of service sequence. This is needed when we check provisioned config file which traverses the service sequence. If a proper provisioned service is found, then it is marked as favorite but in this case we must not do any

[PATCH 10/17] service: Sort service sequence after checking provisioned services

2012-05-28 Thread Jukka Rissanen
--- src/config.c |2 ++ src/service.c | 15 +++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/config.c b/src/config.c index 333e7b7..eda7159 100644 --- a/src/config.c +++ b/src/config.c @@ -829,6 +829,8 @@ static void provision_service(gpointer key,

[PATCH 11/17] service: Support function that saves service

2012-05-28 Thread Jukka Rissanen
--- src/connman.h |1 + src/service.c |5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/connman.h b/src/connman.h index 5b1f529..6170bf0 100644 --- a/src/connman.h +++ b/src/connman.h @@ -694,6 +694,7 @@ GSequence *__connman_service_get_list(struct

[PATCH 12/17] config: Save service after provisioning it

2012-05-28 Thread Jukka Rissanen
--- src/config.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/config.c b/src/config.c index eda7159..4a75c78 100644 --- a/src/config.c +++ b/src/config.c @@ -831,6 +831,8 @@ static void provision_service(gpointer key, gpointer value, gpointer user_data)

[PATCH 14/17] config: Check individual service entries for removal

2012-05-28 Thread Jukka Rissanen
Check if we need to remove a service if user removes an entry from config file. If user changes entry name in config file, then we remove the service and then try to provision the service again because the SSID might still be found. --- src/config.c | 38 +-

[PATCH 13/17] config: Use config file name and entry when deciding removal

2012-05-28 Thread Jukka Rissanen
We need to know the config file and entry name in next patch in order to know if the service entry was removed from config file. --- src/config.c |2 +- src/connman.h |2 +- src/service.c |3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/config.c

[PATCH 15/17] config: No service removal on cleanup

2012-05-28 Thread Jukka Rissanen
We must not remove the services when connman is stopped. --- src/config.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/config.c b/src/config.c index 7f0abf1..683a0ef 100644 --- a/src/config.c +++ b/src/config.c @@ -68,6 +68,7 @@ static int inotify_wd = -1;

Re: [PATCH 2/4] dnsproxy: If no TCP server is created then the request is released

2012-05-31 Thread Jukka Rissanen
Hi Paulo, On 05/30/2012 11:24 PM, Paulo Pizarro wrote: --- src/dnsproxy.c | 81 1 file changed, 34 insertions(+), 47 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index efbc195..54713e6 100644 --- a/src/dnsproxy.c +++

Re: [PATCH 3/4] dnsproxy: If the answer is in the cache, the TCP request is release

2012-05-31 Thread Jukka Rissanen
Hi Paulo, the subject line is missing letter d so it should probably read dnsproxy: If the answer is in the cache, the TCP request is released The patches 3 and 4 needs to be swapped because you are calling destroy_request_data() in patch 3 but the function is moved in patch 4. On

Re: [PATCH 4/4] dnsproxy: releasing all the fields of the structure request_data after forward dns reply

2012-05-31 Thread Jukka Rissanen
Hi Paulo, the commit subject is quite long, would shorter dnsproxy: releasing request_data struct after forward dns reply be enough? As said in patch 3, this one needs to be applied before #3 otherwise there will be compile error. On 05/30/2012 11:24 PM, Paulo Pizarro wrote: ---

[PATCH] timeserver: Do not print error message if key is not found

2012-05-31 Thread Jukka Rissanen
The following error message is printed always even if it does not give much new information so the patch does not print Timeservers key not found errors any longer. connmand[10073]: src/timeserver.c:load_timeservers() Error loading timeservers: Key file does not have key 'Timeservers' ---

Re: Qt library for ConnMan interaction

2012-05-31 Thread Jukka Rissanen
Hi Pascal, On 05/31/2012 01:12 PM, Bach, Pascal wrote: Hello I'm currently trying to get connman work together with Qt via QtDBus. I already had some success. Now I think it would be useful to have a nice Qt wrapper around the low level DBus stuff. I'm already aware of [1] libconnman-qt but

[RFC] VPN refactoring

2012-05-31 Thread Jukka Rissanen
Hi all, Here are some ideas how the VPN functionality in ConnMan could look like in the future. This mail is more like base for brainstorming and not a concrete plan. Currently VPN functionality is implemented via VPN plugin in ConnMan. The master VPN plugin uses individual VPN plugins like

Re: [PATCH v2] dnsproxy: If the answer is in the cache, the TCP request is released

2012-06-01 Thread Jukka Rissanen
Hi Paulo, On 05/31/2012 05:48 PM, Paulo Pizarro wrote: --- src/dnsproxy.c | 51 --- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index efbc195..6af6e28 100644 --- a/src/dnsproxy.c +++

[PATCH 0/3] Misc dnsproxy fixes

2012-06-01 Thread Jukka Rissanen
are the same. Fortunately valgrind showed the problem easily. The patch 2 changes back the memmove() that was removed by commit 3ba2d070. The memcpy() won't work here because the memory areas can overlap. The patch 3 will randomize the DNS transaction id. Cheers, Jukka Jukka Rissanen (3

[PATCH 3/3] dnsproxy: Randomize the transaction id

2012-06-01 Thread Jukka Rissanen
--- src/dnsproxy.c | 25 - 1 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 49651a2..ea7a122 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -24,6 +24,7 @@ #endif #include errno.h +#include stdlib.h #include

[PATCH 1/3] dnsproxy: Check overlapping memcpy

2012-06-01 Thread Jukka Rissanen
The problem was seen with valgrind. We tried to get hostname without domain part and if server returns an error, we could end up in situation where domain_len == 0 even if append_domain is set to TRUE. So check that if domain_len is 0, then do not try to memcpy. --- src/dnsproxy.c | 21

Re: [PATCH] Only one copy of the relevant buffers will be made to a TCP request.

2012-06-04 Thread Jukka Rissanen
Hi Paulo, patch looks good, but there are some nitpicks. On 06/04/2012 07:52 AM, Paulo Pizarro wrote: Upon receiving a TCP request, the dnsproxy scans the list of nameservers and for each (UDP) nameserver a TCP server is created and starts its connection. Since the connection was not done

[PATCH] dnsproxy: Do not print too many info messages

2012-06-04 Thread Jukka Rissanen
Convert connman_info() into DBG() in order to avoid excessive logging when debug prints are disabled. --- src/dnsproxy.c | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index ea7a122..d7ef63b 100644 --- a/src/dnsproxy.c +++

[PATCH v2 01/18] service: Added function to return service by identifier

2012-06-05 Thread Jukka Rissanen
--- src/connman.h |1 + src/service.c |5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/connman.h b/src/connman.h index 82643cc..bda4f7f 100644 --- a/src/connman.h +++ b/src/connman.h @@ -564,6 +564,7 @@ void __connman_service_list_struct(DBusMessageIter *iter);

[PATCH v2 00/18] Unprovision a provisioned service

2012-06-05 Thread Jukka Rissanen
Hi, this v2 fixes the following issues: #2 - Refactoring the storage functions. #4 - Service could be re-connected after unprovisioning. #15 - Only one service was cleanup properly when shutting down. Cheers, Jukka Jukka Rissanen (18): service: Added function to return service

[PATCH v2 02/18] storage: Add function to remove a specific service

2012-06-05 Thread Jukka Rissanen
All known files from service directory are removed and if successfull then the service directory is also removed. --- src/connman.h |1 + src/storage.c | 63 + 2 files changed, 64 insertions(+), 0 deletions(-) diff --git

[PATCH v2 03/18] service: Add setter for config information

2012-06-05 Thread Jukka Rissanen
Save config information (file name and section id) for provisioned services. The information is used to remove the service when config file is removed. --- src/connman.h |2 ++ src/service.c | 17 + 2 files changed, 19 insertions(+), 0 deletions(-) diff --git

[PATCH v2 04/18] service: Add function to remove a service

2012-06-05 Thread Jukka Rissanen
--- src/connman.h |1 + src/service.c | 39 ++- 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/connman.h b/src/connman.h index 5f55263..fb2be57 100644 --- a/src/connman.h +++ b/src/connman.h @@ -620,6 +620,7 @@ int

[PATCH v2 05/18] config: Remove service if config file is removed

2012-06-05 Thread Jukka Rissanen
If the user removes the config file, we disconnect and then try to remove the corresponding service directory and all known files (settings and data). --- src/config.c | 69 - 1 files changed, 48 insertions(+), 21 deletions(-) diff --git

[PATCH v2 06/18] config: Set config information in service

2012-06-05 Thread Jukka Rissanen
This is needed so that service can know if the config file is removed when connmand is not running. --- src/config.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/config.c b/src/config.c index 9931621..253c277 100644 --- a/src/config.c +++ b/src/config.c

[PATCH v2 07/18] service: Save provisioned config information

2012-06-05 Thread Jukka Rissanen
--- src/service.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/service.c b/src/service.c index b679fad..de1ae2f 100644 --- a/src/service.c +++ b/src/service.c @@ -678,6 +678,15 @@ static int service_save(struct connman_service *service)

[PATCH v2 08/18] service: Remove unprovisioned services when starting connman

2012-06-05 Thread Jukka Rissanen
--- src/service.c | 62 + 1 files changed, 62 insertions(+), 0 deletions(-) diff --git a/src/service.c b/src/service.c index de1ae2f..ee7ffc9 100644 --- a/src/service.c +++ b/src/service.c @@ -6214,6 +6214,66 @@

[PATCH v2 09/18] service: Add function to set the favorite flag

2012-06-05 Thread Jukka Rissanen
Add a function that sets favorite flag but which does not touch the ordering of service sequence. This is needed when we check provisioned config file which traverses the service sequence. If a proper provisioned service is found, then it is marked as favorite but in this case we must not do any

[PATCH v2 11/18] service: Sort service sequence after checking provisioned services

2012-06-05 Thread Jukka Rissanen
--- src/config.c |2 ++ src/service.c | 15 +++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/config.c b/src/config.c index aba06c4..e04a88f 100644 --- a/src/config.c +++ b/src/config.c @@ -828,6 +828,8 @@ static void provision_service(gpointer key,

[PATCH v2 10/18] service: Mark service as dirty and needing sorting

2012-06-05 Thread Jukka Rissanen
--- src/connman.h |1 + src/service.c |6 ++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/connman.h b/src/connman.h index 1d25cde..94c5207 100644 --- a/src/connman.h +++ b/src/connman.h @@ -694,6 +694,7 @@ GSequence *__connman_service_get_list(struct

[PATCH v2 12/18] service: Support function that saves service

2012-06-05 Thread Jukka Rissanen
--- src/connman.h |1 + src/service.c |5 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/connman.h b/src/connman.h index 94c5207..c8b560b 100644 --- a/src/connman.h +++ b/src/connman.h @@ -695,6 +695,7 @@ GSequence *__connman_service_get_list(struct

[PATCH v2 13/18] config: Save service after provisioning it

2012-06-05 Thread Jukka Rissanen
--- src/config.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/config.c b/src/config.c index e04a88f..f3628fd 100644 --- a/src/config.c +++ b/src/config.c @@ -830,6 +830,8 @@ static void provision_service(gpointer key, gpointer value, gpointer user_data)

[PATCH v2 14/18] config: Use config file name and entry when deciding removal

2012-06-05 Thread Jukka Rissanen
We need to know the config file and entry name in next patch in order to know if the service entry was removed from config file. --- src/config.c |2 +- src/connman.h |2 +- src/service.c |3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/config.c

[PATCH v2 16/18] config: No service removal on cleanup

2012-06-05 Thread Jukka Rissanen
We must not remove the services when connman is stopped. --- src/config.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/src/config.c b/src/config.c index 6af979d..b304645 100644 --- a/src/config.c +++ b/src/config.c @@ -68,6 +68,7 @@ static int inotify_wd = -1;

[PATCH v2 17/18] config: Check if we need to rescan the config file for any changes

2012-06-05 Thread Jukka Rissanen
--- src/config.c | 20 +--- src/connman.h |2 +- src/service.c | 24 3 files changed, 38 insertions(+), 8 deletions(-) diff --git a/src/config.c b/src/config.c index b304645..5363dc3 100644 --- a/src/config.c +++ b/src/config.c @@ -629,9 +629,20

[PATCH v2 15/18] config: Check individual service entries for removal

2012-06-05 Thread Jukka Rissanen
Check if we need to remove a service if user removes an entry from config file. If user changes entry name in config file, then we remove the service and then try to provision the service again because the SSID might still be found. --- src/config.c | 38 +-

[PATCH v2] doc: Describe what happens when config file is removed

2012-06-05 Thread Jukka Rissanen
--- doc/config-format.txt |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/doc/config-format.txt b/doc/config-format.txt index 1e03f78..4f76832 100644 --- a/doc/config-format.txt +++ b/doc/config-format.txt @@ -8,6 +8,12 @@ characters than letters or numbers and must

Re: [PATCH 1/3] dnsproxy: Check overlapping memcpy

2012-06-05 Thread Jukka Rissanen
Hi Lucas, On 06/05/2012 07:37 AM, Lucas De Marchi wrote: Hi Jukka On Fri, Jun 1, 2012 at 9:02 AM, Jukka Rissanen jukka.rissa...@linux.intel.com wrote: The problem was seen with valgrind. We tried to get hostname without domain part and if server returns an error, we could end up in situation

Re: [PATCH 2/3] dnsproxy: Use memmove() when discarding domain name

2012-06-05 Thread Jukka Rissanen
Hi Lucas, On 06/05/2012 07:42 AM, Lucas De Marchi wrote: Hi Jukka, On Fri, Jun 1, 2012 at 9:02 AM, Jukka Rissanen jukka.rissa...@linux.intel.com wrote: The memory areas can overlap so memmove() must be used. --- src/dnsproxy.c |6 +- 1 files changed, 5 insertions(+), 1 deletions

[PATCH] service: Return EINPROGRESS when user tries to connect hidden AP

2012-06-05 Thread Jukka Rissanen
We return EINPROGRESS when user tries to connect to hidden AP instead of EIO. The error is returned because we are trying to connect to pseudo service (not the real service). We cannot wait until the real service is ready because the real service does not have access to dbus pending message and

Re: Connman 1.x Regression / Issue List

2012-06-05 Thread Jukka Rissanen
Hi Grant, On 06/04/2012 06:39 PM, Grant Erickson wrote: Over the weekend I identified a few add'l regressions in functionality in connman-1.x relative to connman-0.7x that I am going to be diving into today: 1) Connman does not automatically reconnect to idle services following a

Re: [PATCH] service: Return EINPROGRESS when user tries to connect hidden AP

2012-06-06 Thread Jukka Rissanen
Hi Marcel, On 06/05/2012 06:27 PM, Marcel Holtmann wrote: Hi Jukka, We return EINPROGRESS when user tries to connect to hidden AP instead of EIO. The error is returned because we are trying to connect to pseudo service (not the real service). We cannot wait until the real service is ready

[PATCH] ipconfig: Set IPv6 privacy default value from kernel default

2012-06-06 Thread Jukka Rissanen
The idea is to use the current kernel default value as an initial value for IPv6 privacy setting. This way distros can use whatever privacy value they want without need to tweak connman. --- src/ipconfig.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git

[PATCH] service: Remember dbus reply when connecting to hidden service

2012-06-07 Thread Jukka Rissanen
If the user is connecting to hidden network, then we delay the return of the reply to caller until the real service has connected. This way the user connect to hidden and non-hidden networks works the same way from caller point of view. --- src/service.c | 81

Re: [PATCH 1/6] dnsproxy: Only one copy of the relevant buffers will be made to a TCP request

2012-06-13 Thread Jukka Rissanen
Hi Paolo, On 10 June 2012 01:34, Paulo Pizarro paulo.piza...@gmail.com wrote: This copy will be made after scanning the list of nameservers and  only if at least one TCP server is created. Do not start the above line with space. Otherwise, it will be sent an error response to the request.

Re: [PATCH 4/6] dnsproxy: Avoiding duplication of domains in the list of domains of the TCP server

2012-06-13 Thread Jukka Rissanen
Hi Paolo, On 10 June 2012 01:34, Paulo Pizarro paulo.piza...@gmail.com wrote: The domain list is created in the tcp_server_event function  at connection time (G_IO_OUT event), so it is not necessary  to create it here too. There are extra spaces at the beginning of the line above. ---  

Re: [PATCH 6/6] dnsproxy: fix flushing pending requests

2012-06-13 Thread Jukka Rissanen
Hi Paolo, On 10 June 2012 01:34, Paulo Pizarro paulo.piza...@gmail.com wrote: ---  src/dnsproxy.c |   31 ---  1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 1eaaa06..c667402 100644 --- a/src/dnsproxy.c +++

[PATCH] service: Connecting hidden network waits until connected

2012-06-15 Thread Jukka Rissanen
If the user is connecting to hidden network, then we delay the return of the reply to caller until the real service has connected. This way the user connect to hidden and non-hidden networks works the same way from caller point of view. --- Hi, this is 3rd version of connect to hidden network

[PATCH v4 1/3] service: Split reply_pending function to two parts

2012-06-15 Thread Jukka Rissanen
Subsequent patches need access to the pending dbus data so that they can send reply to the client so split reply_pending() into two parts. --- src/connman.h |1 + src/service.c | 33 - 2 files changed, 21 insertions(+), 13 deletions(-) diff --git

[PATCH v4 0/3] service: Connecting hidden network waits until connected

2012-06-15 Thread Jukka Rissanen
Hi, this v4 split the patch into three pieces for easier consumption. No functionality changes from v3. Cheers, Jukka Jukka Rissanen (3): service: Split reply_pending function to two parts service: Add support functions service: Connecting hidden network waits until connected include

[PATCH v4 2/3] service: Add support functions

2012-06-15 Thread Jukka Rissanen
--- src/connman.h |4 src/service.c | 32 2 files changed, 36 insertions(+) diff --git a/src/connman.h b/src/connman.h index ed0d555..7f87a56 100644 --- a/src/connman.h +++ b/src/connman.h @@ -624,6 +624,10 @@ int __connman_service_disconnect(struct

[PATCH v4 3/3] service: Connecting hidden network waits until connected

2012-06-15 Thread Jukka Rissanen
If the user is connecting to hidden network, then we delay the return of the reply to caller until the real service has connected. This way the user connect to hidden and non-hidden networks works the same way from caller point of view. --- include/device.h |3 ++- include/network.h |3

[PATCH] timeserver: Get rid of useless and annoying error message

2012-06-15 Thread Jukka Rissanen
--- src/timeserver.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/timeserver.c b/src/timeserver.c index e218fe2..467da52 100644 --- a/src/timeserver.c +++ b/src/timeserver.c @@ -65,7 +65,6 @@ static void save_timeservers(char **servers) static char

[PATCH v5 0/3] service: Connecting hidden network waits until connected

2012-06-15 Thread Jukka Rissanen
Hi, this v5 fixes the hidden service check that Patrik noticed. Cheers, Jukka Jukka Rissanen (3): service: Split reply_pending function to two parts service: Add support functions service: Connecting hidden network waits until connected include/device.h |3 +- include/network.h

[PATCH v5 1/3] service: Split reply_pending function to two parts

2012-06-15 Thread Jukka Rissanen
Subsequent patches need access to the pending dbus data so that they can send reply to the client so split reply_pending() into two parts. --- src/connman.h |1 + src/service.c | 33 - 2 files changed, 21 insertions(+), 13 deletions(-) diff --git

[PATCH v5 3/3] service: Connecting hidden network waits until connected

2012-06-15 Thread Jukka Rissanen
If the user is connecting to hidden network, then we delay the return of the reply to caller until the real service has connected. This way the user connect to hidden and non-hidden networks works the same way from caller point of view. --- include/device.h |3 ++- include/network.h |3

[PATCH v5 2/3] service: Add support functions

2012-06-15 Thread Jukka Rissanen
--- src/connman.h |4 src/service.c | 32 2 files changed, 36 insertions(+) diff --git a/src/connman.h b/src/connman.h index ed0d555..7f87a56 100644 --- a/src/connman.h +++ b/src/connman.h @@ -624,6 +624,10 @@ int __connman_service_disconnect(struct

[PATCH 0/7] DNS TCP caching fixes

2012-06-19 Thread Jukka Rissanen
, Jukka Jukka Rissanen (7): dnsproxy: Do not generate SIGPIPE dnsproxy: Save DNS packet in cache always in TCP format dnsproxy: Fix the negative caching of record dnsproxy: Check cache properly for TCP packets dnsproxy: Added more debugging prints dnsproxy: Use DNS header in checks

[PATCH 2/7] dnsproxy: Save DNS packet in cache always in TCP format

2012-06-19 Thread Jukka Rissanen
The cached DNS packet will always contain two prefix bytes. For UDP we do not send these two extra bytes. This way we do not need to know if the cached message is from UDP or TCP query. --- src/dnsproxy.c | 70 +--- 1 file changed, 57

[PATCH 3/7] dnsproxy: Fix the negative caching of AAAA record

2012-06-19 Thread Jukka Rissanen
Handle the TCP offset properly. --- src/dnsproxy.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 03d334f..f309d0d 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -1283,9 +1283,12 @@ static int cache_update(struct

[PATCH 4/7] dnsproxy: Check cache properly for TCP packets

2012-06-19 Thread Jukka Rissanen
From: Jukka Rissanen jukka.rissa...@gmail.com The DNS packet starts from offset 2 in TCP payload. --- src/dnsproxy.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index f309d0d..7d801a1 100644 --- a/src/dnsproxy.c +++ b/src

[PATCH 7/7] dnsproxy: Check cache for TCP request before connecting to server

2012-06-19 Thread Jukka Rissanen
It is not necessary to create TCP sockets to server if we have the answer already in the cache. --- src/dnsproxy.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index e8716b5..7b1b668 100644 ---

[PATCH 5/7] dnsproxy: Added more debugging prints

2012-06-19 Thread Jukka Rissanen
--- src/dnsproxy.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 7d801a1..ed72de1 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -439,7 +439,7 @@ static void send_response(int sk, unsigned char *buf, int

[PATCH 6/7] dnsproxy: Use DNS header in checks

2012-06-19 Thread Jukka Rissanen
We should use the DNS header struct when checking DNS protocol values instead of using pointer so that the TCP offset is properly taken care of. --- src/dnsproxy.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index

Re: [PATCH v2 2/4] main: Support NetworkInterfaceBlacklist from main.conf

2012-06-20 Thread Jukka Rissanen
Hi Manfred, On 06/19/2012 05:09 PM, Manfred Kober wrote: This adds a settings variable and a function for fetching that list --- src/main.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/src/main.c b/src/main.c index 10085bd..abc936f 100644 ---

[PATCH v2 1/7] dnsproxy: Do not generate SIGPIPE

2012-06-20 Thread Jukka Rissanen
Instead of generating SIGPIPE, just return EPIPE error if TCP stream is broken. This way we cannot get aborted if we receive SIGPIPE (seen this happening). --- src/dnsproxy.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index

[PATCH v2 0/7] DNS TCP caching fixes

2012-06-20 Thread Jukka Rissanen
Hi, this v2 adds null pointer check to patch #4. Cheers, Jukka Jukka Rissanen (7): dnsproxy: Do not generate SIGPIPE dnsproxy: Save DNS packet in cache always in TCP format dnsproxy: Fix the negative caching of record dnsproxy: Check cache properly for TCP packets dnsproxy: Added

[PATCH v2 2/7] dnsproxy: Save DNS packet in cache always in TCP format

2012-06-20 Thread Jukka Rissanen
The cached DNS packet will always contain two prefix bytes. For UDP we do not send these two extra bytes. This way we do not need to know if the cached message is from UDP or TCP query. --- src/dnsproxy.c | 70 +--- 1 file changed, 57

[PATCH v2 3/7] dnsproxy: Fix the negative caching of AAAA record

2012-06-20 Thread Jukka Rissanen
Handle the TCP offset properly. --- src/dnsproxy.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index 03d334f..f309d0d 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -1283,9 +1283,12 @@ static int cache_update(struct

[PATCH v2 4/7] dnsproxy: Check cache properly for TCP packets

2012-06-20 Thread Jukka Rissanen
The DNS packet starts from offset 2 in TCP payload. --- src/dnsproxy.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index f309d0d..d5c77f7 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -665,13 +665,22 @@ static

[PATCH v2 5/7] dnsproxy: Added more debugging prints

2012-06-20 Thread Jukka Rissanen
--- src/dnsproxy.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index d5c77f7..e7123f1 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -439,7 +439,7 @@ static void send_response(int sk, unsigned char *buf, int

[PATCH v2 7/7] dnsproxy: Check cache for TCP request before connecting to server

2012-06-20 Thread Jukka Rissanen
It is not necessary to create TCP sockets to server if we have the answer already in the cache. --- src/dnsproxy.c | 32 +++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index dc8ab13..82c5c1f 100644 ---

[RFC] VPN refactoring, dbus API proposal

2012-06-21 Thread Jukka Rissanen
Hi, here is first proposal for dbus API between ConnMan and vpnrunner. Any comments? vpnrunner = Service net.vpnrunner Interface net.vpnrunner.Manager Object path /net/vpnrunner/manager Methods object path, fd, index Start(dict provider)

[PATCH 0/2] Return proper value if technology is already enabled or disabled

2012-06-21 Thread Jukka Rissanen
Hi, return AlreadyEnabled or AlreadyDisabled in technology instead of always returning InProgress. Cheers, Jukka Jukka Rissanen (2): technology: Return proper error code when already enabled technology: Return proper error code when already disabled src/technology.c | 10 -- 1

[PATCH 1/2] technology: Return proper error code when already enabled

2012-06-21 Thread Jukka Rissanen
We do not call the generic error message function because it maps EALREADY to EINPROGRESS. So instead we call correct error return function which returns AlreadyEnabled to the caller. Fixes BMC#25306 --- src/technology.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[PATCH] wifi: Check we have valid wifi pointer in autoscan

2012-06-21 Thread Jukka Rissanen
The wifi pointer in device might be NULL if wpa_supplicant dies between autoscans. --- plugins/wifi.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/wifi.c b/plugins/wifi.c index 3e48999..f1ee6da 100644 --- a/plugins/wifi.c +++ b/plugins/wifi.c @@ -502,6 +502,9 @@ static

[PATCH 0/2] Enable hidden AP provisioning

2012-06-26 Thread Jukka Rissanen
Hi, currently it is not possible to provision a hidden AP. This patchset enables user to create a config file and mark the AP as hidden one and ConnMan is able to connect to it. Cheers, Jukka Jukka Rissanen (2): config: Add support for hidden AP provisioning doc: Hidden AP provisioning

[PATCH 1/2] config: Add support for hidden AP provisioning

2012-06-26 Thread Jukka Rissanen
--- Makefile.am |2 +- include/provision.h | 51 + plugins/wifi.c | 78 ++- src/config.c| 76 + 4 files changed, 193 insertions(+), 14

[PATCH 2/2] doc: Hidden AP provisioning information added

2012-06-26 Thread Jukka Rissanen
--- doc/config-format.txt |2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/config-format.txt b/doc/config-format.txt index 4f76832..d8146be 100644 --- a/doc/config-format.txt +++ b/doc/config-format.txt @@ -53,6 +53,8 @@ Allowed fields: Prefix the value with EAP- to indicate the

[PATCH] wifi: Debug print fixed

2012-06-26 Thread Jukka Rissanen
Convert a warn message to debug one because it is printed too often to be usefull as a warning message. --- The patch requires that the Enable hidden AP provisioning patchset is applied first. Cheers, Jukka plugins/wifi.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] gweb: Use g_try_realloc instead of g_realloc

2012-06-26 Thread Jukka Rissanen
--- gweb/gresolv.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gweb/gresolv.c b/gweb/gresolv.c index cd5a5bf..e93bf4f 100644 --- a/gweb/gresolv.c +++ b/gweb/gresolv.c @@ -607,8 +607,10 @@ static void add_result(struct resolv_lookup *lookup, int family,

[PATCH] service: Make sure the pending reply is not lost

2012-07-04 Thread Jukka Rissanen
The user data (pending reply) can be null if agent returns an error. In this case do not overwrite the real pending reply. --- Hi, this should fix the problem Gustavo reported. Gustavo, could you try this one and ack/nack if this works ok for you? Cheers, Jukka src/service.c |3 +++ 1

[PATCH] git: Ignore emacs backup files

2012-07-05 Thread Jukka Rissanen
--- .gitignore |1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0570e4a..dd08ce7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +*~ *.o *.a *.lo -- 1.7.9.5 ___ connman mailing list connman@connman.net

[PATCH 0/2] Cleanup old routes etc when connman starts

2012-07-06 Thread Jukka Rissanen
Hi, This patchset cleans the interfaces / routes when connman starts. This is done so that there will not be any obsolete routes etc that might confuse connman. Cheers, Jukka Jukka Rissanen (2): inet: Return all running interfaces device: Turn off all running interfaces at startup src

[PATCH 1/2] inet: Return all running interfaces

2012-07-06 Thread Jukka Rissanen
Add a function that returns all (except loopback) interfaces that are up and running (have IP address). This information is used in following patch to clean up the routes that are left hanging around. --- src/connman.h |1 + src/inet.c| 77

[PATCH 2/2] device: Turn off all running interfaces at startup

2012-07-06 Thread Jukka Rissanen
Turning off running interfaces that have IP address, causes all routes related to those interfaces to be removed by kernel. This way connman will get a fresh start without any extra and obsolete routes around. --- src/device.c | 47 +++ 1 file

[PATCH v2 0/2] Cleanup old routes etc when connman starts

2012-07-09 Thread Jukka Rissanen
Hi, this v2 fixes minor issues found out by Marcel. Cheers, Jukka Jukka Rissanen (2): inet: Return all running interfaces device: Turn off all running interfaces at startup src/connman.h |1 + src/device.c | 50 src/inet.c| 78

[PATCH v2 1/2] inet: Return all running interfaces

2012-07-09 Thread Jukka Rissanen
Add a function that returns all (except loopback) interfaces that are up and running (have IP address). This information is used in following patch to clean up the routes that are left hanging around. --- src/connman.h |1 + src/inet.c| 78

[PATCH v2 2/2] device: Turn off all running interfaces at startup

2012-07-09 Thread Jukka Rissanen
Turning off running interfaces that have IP address, causes all routes related to those interfaces to be removed by kernel. This way connman will get a fresh start without any extra and obsolete routes around. --- src/device.c | 50 ++ 1 file

[PATCH v2 0/4] Enable hidden AP provisioning

2012-07-09 Thread Jukka Rissanen
Jukka Rissanen (4): config: Get configurations that are provisioned config: Read hidden AP information from config file wifi: Scan all hidden and provisioned AP doc: Hidden AP provisioning information added Makefile.am |2 +- doc/config-format.txt |2 ++ include

<    3   4   5   6   7   8   9   10   11   12   >