From: Pasi Sjöholm <pasi.sjoh...@jollamobile.com> Fixes the issue that network index was not set for ipv6-connections and therefore slaac/dhcpv6 was not working e.g. ofono cellular connections. --- src/network.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/network.c b/src/network.c index b388995..59f8679 100644 --- a/src/network.c +++ b/src/network.c @@ -1139,14 +1139,23 @@ void connman_network_set_index(struct connman_network *network, int index) goto done; ipconfig = __connman_service_get_ip4config(service); - if (!ipconfig) - goto done; + if (ipconfig) { + /* If index changed, the index of ipconfig must be reset. */ + __connman_ipconfig_set_index(ipconfig, index); + + DBG("index %d service %p ip4config %p", network->index, + service, ipconfig); + } - /* If index changed, the index of ipconfig must be reset. */ - __connman_ipconfig_set_index(ipconfig, index); + ipconfig = __connman_service_get_ip6config(service); + if (ipconfig) { + /* If index changed, the index of ipconfig must be reset. */ + __connman_ipconfig_set_index(ipconfig, index); + + DBG("index %d service %p ip6config %p", network->index, + service, ipconfig); + } - DBG("index %d service %p ip4config %p", network->index, - service, ipconfig); done: network->index = index; } -- 2.1.0 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman