mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
networkd: act on lease only if there is one
Interface could go down before acquiring a dhcp lease
This commit is contained in:
parent
acfbbf5c56
commit
17256461f5
@ -626,10 +626,12 @@ static void dhcp_handler(sd_dhcp_client *client, int event, void *userdata) {
|
||||
return;
|
||||
}
|
||||
|
||||
r = dhcp_lease_lost(link);
|
||||
if (r < 0) {
|
||||
link_enter_failed(link);
|
||||
return;
|
||||
if (link->dhcp_lease) {
|
||||
r = dhcp_lease_lost(link);
|
||||
if (r < 0) {
|
||||
link_enter_failed(link);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (event == DHCP_EVENT_IP_CHANGE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user