In case a service is unknown, the expected behavior is that it uses
dhcp. Currently, method will be left blank and thus connman will not be
able to connect to that service unless method is explicitly set through
IPv4.Configuration property.
---
src/ipconfig.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/ipconfig.c b/src/ipconfig.c
index 9e1dbf4..91ce244 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -1238,7 +1238,10 @@ int __connman_ipconfig_load(struct connman_ipconfig
*ipconfig,
key = g_strdup_printf("%smethod", prefix);
method = g_key_file_get_string(keyfile, identifier, key, NULL);
- ipconfig->method = __connman_ipconfig_string2method(method);
+ if (method == NULL)
+ ipconfig->method = CONNMAN_IPCONFIG_METHOD_DHCP;
+ else
+ ipconfig->method = __connman_ipconfig_string2method(method);
g_free(key);
key = g_strdup_printf("%snetmask_prefixlen", prefix);
--
1.7.0
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman