]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
network: set dhcp4_configured flag false before configuring address
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 28 May 2019 13:14:13 +0000 (22:14 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 28 May 2019 13:21:23 +0000 (22:21 +0900)
Otherwise, even if dhcp_lease_acquired() fails, the flag is still on.

src/network/networkd-dhcp4.c

index 71efd03ff04ef7ea70c9028e29c41b9aed01588a..ae74508c878c7ddcb41fc468d991814424e73a96 100644 (file)
@@ -427,6 +427,8 @@ static int dhcp_lease_acquired(sd_dhcp_client *client, Link *link) {
         assert(client);
         assert(link);
 
+        link->dhcp4_configured = false;
+
         r = sd_dhcp_client_get_lease(client, &lease);
         if (r < 0)
                 return log_link_error_errno(link, r, "DHCP error: No lease: %m");