From: Jukka Rissanen Date: Wed, 18 Jan 2012 13:24:58 +0000 (+0200) Subject: network: Verify we are connected before starting DHCPv6 X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~704 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23844ec2f4283725741670c860af93fe330a9fcc;p=profile%2Fivi%2Fconnman.git network: Verify we are connected before starting DHCPv6 --- diff --git a/src/network.c b/src/network.c index bd4573b..7d120d4 100644 --- a/src/network.c +++ b/src/network.c @@ -1096,6 +1096,15 @@ static void check_dhcpv6(struct nd_router_advert *reply, network->router_solicit_count = 0; + /* + * If we were disconnected while waiting router advertisement, + * we just quit and do not start DHCPv6 + */ + if (network->connected == FALSE) { + connman_network_unref(network); + return; + } + prefixes = __connman_inet_ipv6_get_prefixes(reply, length); /*