When enabling IPv6 ipconfig, we enable kernel IPv6 support too early.
The ipconfig might get unreffed which will disable ipconfig and
thus disable kernel IPv6 support. By moving kernel IPv6 enabling
after the ipconfig unref call, we make sure that IPv6 kernel support
is properly enabled.
This is related to fix in commit
d479904ecaa2bd9
if (ipdevice->config_ipv6 == ipconfig)
return -EALREADY;
type = CONNMAN_IPCONFIG_TYPE_IPV6;
- enable_ipv6(ipconfig);
} else
return -EINVAL;
if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
ipdevice->config_ipv4 = __connman_ipconfig_ref(ipconfig);
- else if (type == CONNMAN_IPCONFIG_TYPE_IPV6)
+ else if (type == CONNMAN_IPCONFIG_TYPE_IPV6) {
ipdevice->config_ipv6 = __connman_ipconfig_ref(ipconfig);
+ enable_ipv6(ipdevice->config_ipv6);
+ }
ipconfig_list = g_list_append(ipconfig_list, ipconfig);
if (ipdevice->flags & IFF_UP)