[networkd-dhcp6] do not call sd_dhcp6_client_start() from dhcp6_request_address()
authortomty89 <tom.ty89@gmail.com>
Fri, 20 May 2016 10:28:30 +0000 (18:28 +0800)
committertomty89 <tom.ty89@gmail.com>
Fri, 20 May 2016 10:28:30 +0000 (18:28 +0800)
Starting the DHCP client doesn't seem like dhcp6_request_address()'s responsibility anyway. Whenever it's called, sd_dhcp6_client_start() is unconditionally called outside of it as well. See ndisc_router_handler() and ndisc_handler() in networkd-ndisc.c.

src/network/networkd-dhcp6.c

index 6085b28..37e13e6 100644 (file)
@@ -194,12 +194,6 @@ int dhcp6_request_address(Link *link) {
         if (r < 0)
                 return r;
 
-        if (running) {
-                r = sd_dhcp6_client_start(link->dhcp6_client);
-                if (r < 0)
-                        return r;
-        }
-
         return 0;
 }