RE: [PATCH 2/3] [connman] ofono: Set CONNMAN_IPCONFIG_METHOD_AUTO/DHCP if not _FIXED

2015-01-28 Thread Pasi Sjöholm

Hi,


oFono ConnectionContext does not have a 'Method' property specified in
the IPv6.Settings dict and it is also specified in RFC 6459 that IPv6
uses autoconfiguration. Therefore I rather make
CONNMAN_IPCONFIG_METHOD_AUTO mandatory with patch ofono: IPv6 contexts
use stateless autoconfiguration and/or DHCPv6 and go forward with that
solution.

Was it the IPv6 only context that broke after this?


Yes.

However I will still want part of this patch to be applied:

1)

connman_network_set_index(modem-network, index);

^ Should be called for IPv6 too, and preferably only one time.

2)

If modem-context-ipv4_method is not CONNMAN_IPCONFIG_METHOD_FIXED we
need to call connman_network_set_ipv4_method(modem-network, 
CONNMAN_IPCONFIG_METHOD_DHCP); so that with IPv6-only context (or 
missing IPv4-settings in dual-context) we will not set the old fixed 
IP-address configuration for the interface.


Will send patch soon.

Br,
Pasi
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: [PATCH] counter: fix possible memory leak

2015-01-28 Thread Pasi Sjöholm

Hi,

Patrik, you have probably missed this one?-)

Br,
Pasi

On 08.01.2015 23:56, pasi.sjoh...@jolla.com wrote:

From: Pasi Sjöholm pasi.sjoh...@jollamobile.com

DBusMessage message leaks memory if not cleaned when
counter is not found.
---
  src/counter.c | 5 -
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/counter.c b/src/counter.c
index 06e5daf..8ea6205 100644
--- a/src/counter.c
+++ b/src/counter.c
@@ -133,8 +133,11 @@ void __connman_counter_send_usage(const char *path,
struct connman_counter *counter;

counter = g_hash_table_lookup(counter_table, path);
-   if (!counter)
+   if (!counter) {
+   if (message)
+   dbus_message_unref(message);
return;
+   }

dbus_message_set_destination(message, counter-owner);
dbus_message_set_path(message, counter-path);


___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Re: [PATCH 3/3] [connman] ofono: Call set_connected if new configuration received while connected

2015-01-28 Thread Pasi Sjöholm

On 28.01.2015 14:13, Patrik Flykt wrote:

I meant that why isn't the whole message parsed through first, i.e. why
is set_connected() called immediately after extracting IPv4/IPv6
settings and not after all the properties have been handled.


/*
 * oFono guarantees the ordering of Settings and
 * Active. Settings will always be send before Active = True.
 * That means we don't have to order here.
 */

set_connected never gets called before we have received Active = 
True-signal. After that we do not get anymore Active = True if 
context is changed, so from where would we know that all properties are 
handled/sent?


And yes.. the both IPv4- and IPv6-settings are sent in separate messages 
as well as the other properties.


Br,
Pasi



___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: connman vs networkmanager today

2015-01-28 Thread Vasiliy Tolstov
2015-01-12 12:07 GMT+03:00 Tomasz Bursztyka tomasz.burszt...@linux.intel.com:
 ConnMan does not support ipsec yet.


Do you have any plans to add this kind of support? As i understand we
simply need to spawn xl2tp client... ?

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru
jabber: v...@selfip.ru
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


Re: [PATCH 3/3] [connman] ofono: Call set_connected if new configuration received while connected

2015-01-28 Thread Patrik Flykt
On Wed, 2015-01-28 at 11:27 +, Pasi Sjöholm wrote:
 Why does set_connected() not wait until all properties are checked?
 
 1) RIL signals to ofono that the context is active.
 2) ofono can't know if there will be additional signals or not, how
 long to to wait for?
 3) IMO, the changes from signaled changes from ofono should be taken
 in use.

I meant that why isn't the whole message parsed through first, i.e. why
is set_connected() called immediately after extracting IPv4/IPv6
settings and not after all the properties have been handled.

Cheers,

Patrik


___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Re: connman vs networkmanager today

2015-01-28 Thread Jukka Rissanen
Hi Vasiliy,

On ke, 2015-01-28 at 13:51 +0400, Vasiliy Tolstov wrote:
 2015-01-12 12:07 GMT+03:00 Tomasz Bursztyka 
 tomasz.burszt...@linux.intel.com:
  ConnMan does not support ipsec yet.
 
 
 Do you have any plans to add this kind of support? As i understand we
 simply need to spawn xl2tp client... ?
 

I sent in 2012 one proposal for IPSec, more details in this thread
https://lists.syncevolution.org/pipermail/connman/2012-January/007916.html

At that time it was agreed that IPSec functionality would need to be
integrated more tightly into ConnMan instead of being launched as a
separate daemon (racoon). 

If you are able to contribute, patches are welcome.


Cheers,
Jukka


___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


RE: [PATCH 3/3] [connman] ofono: Call set_connected if new configuration received while connected

2015-01-28 Thread Pasi Sjöholm
3) IMO, the changes from signaled changes from ofono should be taken in use.

Sorry, people interrupting me.. :D

3) IMO, the changes signaled from ofono to already active connection should  be 
taken in use. 



Br,
Pasi
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


RE: [PATCH 3/3] [connman] ofono: Call set_connected if new configuration received while connected

2015-01-28 Thread Pasi Sjöholm
Hi,

 Ofono can signal new configuration while context is active and therefore
 set_connected needs to be called.
 --- a/plugins/ofono.c
 +++ b/plugins/ofono.c
 +
 + if (modem-active  modem-context-index  -1)
 + set_connected(modem);
   } else if (g_str_equal(key, IPv6.Settings)) {
   DBG(%s IPv6.Settings, modem-path);

   extract_ipv6_settings(value, modem-context);
 +
 + if (modem-active  modem-context-index  -1)
 + set_connected(modem);
Why does set_connected() not wait until all properties are checked?

1) RIL signals to ofono that the context is active.
2) ofono can't know if there will be additional signals or not, how long to to 
wait for?
3) IMO, the changes from signaled changes from ofono should be taken in use.

Br,
Pasi
___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman


[PATCH] dnsproxy: Don't try to destroy NULL hashtable on exit

2015-01-28 Thread Slava Monich
glib doesn't like it.
---
 src/dnsproxy.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 9d7ba61..9787b68 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -3872,8 +3872,10 @@ void __connman_dnsproxy_cleanup(void)
cache_timer = 0;
}
 
-   g_hash_table_destroy(cache);
-   cache = NULL;
+   if (cache) {
+   g_hash_table_destroy(cache);
+   cache = NULL;
+   }
 
connman_notifier_unregister(dnsproxy_notifier);
 
-- 
1.8.3.2

___
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman