Re: [PATCH 2/6] ofono: Implement protocol-message handling for context_changed
On Mon, 2014-12-22 at 13:01 +0200, pasi.sjoh...@jolla.com wrote: From: Pasi Sjöholm pasi.sjoh...@jollamobile.com Reset ipv4/6_method to CONNMAN_IPCONFIG_METHOD_UNKNOWN when protocol is set ip/ipv6/dual on ofono, which can be only done when context is not active. --- plugins/ofono.c | 5 + 1 file changed, 5 insertions(+) diff --git a/plugins/ofono.c b/plugins/ofono.c index 7a8442b..1617764 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -1210,6 +1210,11 @@ static gboolean context_changed(DBusConnection *conn, DBG(%s IPv6.Settings, modem-path); extract_ipv6_settings(value, modem-context); + } else if (g_str_equal(key, Protocol)) { + DBG(%s Protocol, modem-path); + + modem-context-ipv4_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN; + modem-context-ipv6_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN; NACK. If the protocol is ip, IPv6 needs to be off, if ipv6, IPv4 needs to be off. The other protocol should be set to unknown (or dhcp/auto, depending on how it works with the other patches). Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
Re: [PATCH 2/6] ofono: Implement protocol-message handling for context_changed
Hi, On Tue, 2014-12-16 at 14:31 +0200, pasi.sjoh...@jolla.com wrote: From: Pasi Sjöholm pasi.sjoh...@jollamobile.com Reset ipv4/6_method to CONNMAN_IPCONFIG_METHOD_UNKNOWN when protocol is set ip/ipv6/dual on ofono, which can be only done when context is not active. --- plugins/ofono.c | 5 + 1 file changed, 5 insertions(+) diff --git a/plugins/ofono.c b/plugins/ofono.c index 7a8442b..1617764 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -1210,6 +1210,11 @@ static gboolean context_changed(DBusConnection *conn, DBG(%s IPv6.Settings, modem-path); extract_ipv6_settings(value, modem-context); + } else if (g_str_equal(key, Protocol)) { + DBG(%s Protocol, modem-path); + + modem-context-ipv4_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN; + modem-context-ipv6_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN; } else if (g_str_equal(key, Active)) { dbus_bool_t active; Why isn't the value of the oFono 'Protocol' property considered above? Cheers, Patrik ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman
RE: [PATCH 2/6] ofono: Implement protocol-message handling for context_changed
Hi, extract_ipv6_settings(value, modem-context); + } else if (g_str_equal(key, Protocol)) { + DBG(%s Protocol, modem-path); + + modem-context-ipv4_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN; + modem-context-ipv6_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN; } else if (g_str_equal(key, Active)) { Why isn't the value of the oFono 'Protocol' property considered above? 1) Protocol can be only set on ofono when context is not active (connected). 2) We just want to reset the ipv4/6_method to UNKNOWN-state so that both will have to be reconsidered next time when getting online as we do not want to reuse the old configuration from connman side (ip-addres, gateway..) when running set_connected(). E.g. connman setting up (saved) fixed ipv6-address while doing ipv4-only. 3) I don't see any point doing unnecessary comparisation like: if (ip) modem-context-ipv6_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN; else if (ipv6) modem-context-ipv4_method = CONNMAN_IPCONFIG_METHOD_UNKNOWN; when we are going to setup the correct method in extract_ipv4_settings and extract_ipv6_settings but as those are only run when correct message is received therefore we need to reset the methods beforehand. Br, Pasi ___ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman