network: Do not start IPv6 autoconfiguration if already pending
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 18 Jan 2012 13:25:01 +0000 (15:25 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 20 Jan 2012 00:35:24 +0000 (01:35 +0100)
src/network.c

index 82c7cd0..96dd9cc 100644 (file)
@@ -1126,6 +1126,16 @@ static void autoconf_ipv6_set(struct connman_network *network)
 
        DBG("network %p", network);
 
+       if (network->router_solicit_count > 0) {
+               /*
+                * The autoconfiguration is already pending and we have sent
+                * router solicitation messages and are now waiting answers.
+                * There is no need to continue any further.
+                */
+               DBG("autoconfiguration already started");
+               return;
+       }
+
        __connman_device_set_network(network->device, network);
 
        connman_device_set_disconnected(network->device, FALSE);