If we fail to setup timer event sources about the lease lifetime or
T1/T2, then the lease will be never updated, and the user (networkd)
will not receive any notification about the expire. The situation is
terrible. Let's stop the client with error code earlier, and notify the
failure to networkd.
r = client_set_lease_timeouts(client);
if (r < 0)
- log_dhcp_client_errno(client, r, "Failed to set lease timeouts: %m");
+ return log_dhcp_client_errno(client, r, "Failed to set lease timeouts: %m");
client_notify(client, notify_event);
return 0;