1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-03 05:18:09 +03:00

revert to original check that will catch missing server_address

This commit is contained in:
Avram Dorfman 2024-12-18 15:31:16 -05:00
parent ce9423e7b5
commit c54655882b

View File

@ -1608,14 +1608,11 @@ static int client_parse_message(
if (client->bootp) if (client->bootp)
lease->lifetime = USEC_INFINITY; lease->lifetime = USEC_INFINITY;
if (lease->server_address == 0 && !client->bootp)
return log_dhcp_client_errno(client, SYNTHETIC_ERRNO(ENOMSG),
"received lease lacks server address, ignoring.");
if (lease->address == 0 || if (lease->address == 0 ||
lease->server_address == 0 ||
lease->lifetime == 0) lease->lifetime == 0)
return log_dhcp_client_errno(client, SYNTHETIC_ERRNO(ENOMSG), return log_dhcp_client_errno(client, SYNTHETIC_ERRNO(ENOMSG),
"received lease lacks address or lease lifetime, ignoring."); "received lease lacks address, server address or lease lifetime, ignoring.");
r = dhcp_lease_set_default_subnet_mask(lease); r = dhcp_lease_set_default_subnet_mask(lease);
if (r < 0) if (r < 0)