projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c9c827
)
network: set dhcp4_configured flag false before configuring address
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Tue, 28 May 2019 13:14:13 +0000
(22:14 +0900)
committer
Yu 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
patch
|
blob
|
history
diff --git
a/src/network/networkd-dhcp4.c
b/src/network/networkd-dhcp4.c
index
71efd03
..
ae74508
100644
(file)
--- a/
src/network/networkd-dhcp4.c
+++ b/
src/network/networkd-dhcp4.c
@@
-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");