This is a quick fix for the issue where removal of an interface may
cause IPv6 to be disabled/enabled on other interfaces.
When removing an ipdevice in free_ipdevice(), it is ensured that the
ifname (which we get from connman_inet_ifname()) is not NULL,
before invoking set_ipv6_state(). If a NULL ifname is passed into
set_ipv6_state(), it will apply the change to all interfaces instead
of the intended one.
Change-Id: I2b0b6494e3c2d4a80e7a8e2012f274987f6e8142
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
g_free(ipdevice->address);
- set_ipv6_state(ifname, ipdevice->ipv6_enabled);
- set_ipv6_privacy(ifname, ipdevice->ipv6_privacy);
+ if (ifname) {
+ set_ipv6_state(ifname, ipdevice->ipv6_enabled);
+ set_ipv6_privacy(ifname, ipdevice->ipv6_privacy);
+ }
g_free(ifname);
g_free(ipdevice);