Re: [PATCH] Send RS before RDNSS lifetime expires

2012-05-15 Thread Jukka Rissanen
Hi Elena, On 05/15/2012 03:37 PM, Elena Tebesoi wrote: Hi Jukka, Thank you for the quick review and please find my answers inline. A new version of the patch is due, taking into account your suggestions. Regards, Elena On Mon, May 14, 2012 at 2:21 PM, Jukka Rissanen mailto:jukka.rissa

Re: [PATCH] Send RS before RDNSS lifetime expires

2012-05-16 Thread Jukka Rissanen
Hi Elena, while removing the floor(), we could also get rid of ceil() call, On 05/15/2012 03:37 PM, Elena Tebesoi wrote: Hi Jukka, +static gboolean resolver_refresh_cb(gpointer user_data) +{ + struct entry_data *entry = user_data; + int index;

Re: [PATCH]resolver: Fixed cleanup of Resolver timer

2012-05-21 Thread Jukka Rissanen
Hi Elena, On 05/18/2012 05:54 PM, Elena Tebesoi wrote: When connman is restarted, DNS servers are removed and added again with function __connman_resolver_redo_servers(). While removing a DNS entry, one should also remove the resolver timer registered for it. Not doing so, causes the timeout han

Re: [PATCH v2] Send RS before RDNSS lifetime expires

2012-05-21 Thread Jukka Rissanen
Hi Elena, some minor nit picking On 05/18/2012 05:54 PM, Elena Tebesoi wrote: Implemented feature from RFC 6106 section '5.1. Recursive DNS Server Option': "Lifetime 32-bit unsigned integer. ... Hosts MAY send a Router Solicitation to ensure the RDNSS information

Re: [PATCH v3] Send RS before RDNSS lifetime expires

2012-05-21 Thread Jukka Rissanen
Hi, On 05/21/2012 03:49 PM, Elena Tebesoi wrote: > Implemented feature from RFC 6106 section > '5.1. Recursive DNS Server Option': >"Lifetime 32-bit unsigned integer. >... >Hosts MAY send a Router Solicitation to ensure >the RDNSS information is fresh before the interval expi

Re: [PATCH]resolver: Fixed cleanup of Resolver timer

2012-05-21 Thread Jukka Rissanen
Hi Elena, On 05/18/2012 05:54 PM, Elena Tebesoi wrote: When connman is restarted, DNS servers are removed and added again with function __connman_resolver_redo_servers(). While removing a DNS entry, one should also remove the resolver timer registered for it. Not doing so, causes the timeout han

Re: [PATCH v2]resolver: Fixed cleanup of Resolver timer

2012-05-22 Thread Jukka Rissanen
Hi Elena, On 05/21/2012 06:48 PM, Elena Tebesoi wrote: When connman is restarted, DNS servers are removed and added again with function __connman_resolver_redo_servers(). While removing a DNS entry, one should also remove the resolver timer registered for it. Not doing so, causes the timeout han

Re: [PATCH 3/4] agent: Implementing the new type and argument for RequestInput method call

2012-05-23 Thread Jukka Rissanen
Hi Tomasz, On 05/23/2012 03:01 PM, Tomasz Bursztyka wrote: This implements the usage of PreviousPassphrase argument as an informational field type. --- src/agent.c | 19 ++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/src/agent.c b/src/agent.c index cca9e

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 deletion

[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 *creat

[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 +++ b/sr

[PATCH 00/17] Unprovision a provisioned service

2012-05-28 Thread Jukka Rissanen
removed also. Patch 16 check after removal of individual service entry that whether we need to rescan the config for any changes. This way the changes in config file are taken into use immediately. Patch 17 adds information about config removal into config-format.txt Cheers, Jukka Jukka Rissanen

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

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 82643cc..bda4f7f 100644 --- a/src/connman.h +++ b/src/connman.h @@ -564,6 +564,7 @@ void __connman_service_list_struct(DBusMessageIter *iter);

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

2012-05-28 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 | 81 + 2 files changed, 82 insertions(+), 0 deletions(-) diff --git a/src/connman.

[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 a/src/connman.h

[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 a

[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) g_key

[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 @@ __connman_service_create_fr

[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 or

[PATCH 09/17] service: Mark service as dirty and needing sorting

2012-05-28 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 2fca3e8..5b1f529 100644 --- a/src/connman.h +++ b/src/connman.h @@ -693,6 +693,7 @@ GSequence *__connman_service_get_list(struct connman_sess

[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, gpointe

[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 connman_sessi

[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 +- 1

[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 b/src/config.

[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;

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

2012-05-28 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 683a0ef..883849e 100644 --- a/src/config.c +++ b/src/config.c @@ -632,9 +632,20 @

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

2012-05-28 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..78ed81d 100644 --- a/doc/config-format.txt +++ b/doc/config-format.txt @@ -8,6 +8,12 @@ characters than letters or numbers and must h

Re: [PATCH] dnsproxy: possible memory leak when querying the dns via UDP and the answer lies in the cache

2012-05-30 Thread Jukka Rissanen
Hi Paulo, On 05/29/2012 05:27 PM, Paulo Pizarro wrote: If the answer is in the cache, the request is not appended in the request_list and is released. --- src/dnsproxy.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/dnsproxy.c b/src/dn

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 +++ b/s

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 05/30

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: --- src/dn

[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' --- src/ti

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 i

[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 Open

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 +++ b/src/dn

[PATCH 0/3] Misc dnsproxy fixes

2012-06-01 Thread Jukka Rissanen
nters 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 R

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

2012-06-01 Thread Jukka Rissanen
The memory areas can overlap so memmove() must be used. --- src/dnsproxy.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/dnsproxy.c b/src/dnsproxy.c index f56c30c..49651a2 100644 --- a/src/dnsproxy.c +++ b/src/dnsproxy.c @@ -1565,7 +1565,11 @@ static int forward

[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 +#include #include #include #in

[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 yet

[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 +++ b/src/

[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 by

[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 a/src/connman.

[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 a/src/connman.h

[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 __connman_service_co

[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 a

[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) g_key

[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 @@ __connman_service_create_fr

[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 or

[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, gpointe

[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 connman_sess

[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 connman_sessi

[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 b/src/config.

[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 +- 1

[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 h

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 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 where domain_len == 0 even if

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 wrote: The memory areas can overlap so memmove() must be used. --- src/dnsproxy.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/dnsproxy.c

[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 th

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 tech

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 bec

[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 a/src/ipconfig.c

[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 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. > --- >  src/dnsproxy.c

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

2012-06-13 Thread Jukka Rissanen
Hi Paolo, On 10 June 2012 01:34, 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 007bfe0..2bf8205 100644 > --- a/src/dnsproxy.c > +

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 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. > --- >  src/dnsproxy.c |   17

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 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 > +++ b/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" p

[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 a/src/connma

[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 con

[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 **load_times

[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 a/src/connma

[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 con

[PATCH 0/7] DNS TCP caching fixes

2012-06-19 Thread Jukka Rissanen
heers, 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 c

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

2012-06-19 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 28

[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 insertion

[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 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/dnsproxy.c @@ -665,13

[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 --- a/src/dnsproxy

[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 ed72de1..e871

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 28

[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 insertion

[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 uint1

[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 6/7] dnsproxy: Use DNS header in checks

2012-06-20 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 e7123f1..dc8a

<    5   6   7   8   9   10   11   12   13   14   >