mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
Add some basic BOOTP logging
This commit is contained in:
parent
5c5f826222
commit
ce9423e7b5
@ -1548,8 +1548,11 @@ static int client_parse_message(
|
|||||||
}
|
}
|
||||||
|
|
||||||
r = dhcp_option_parse(message, len, dhcp_lease_parse_options, lease, &error_message);
|
r = dhcp_option_parse(message, len, dhcp_lease_parse_options, lease, &error_message);
|
||||||
if (r == -ENOMSG && client->bootp)
|
if (r == -ENOMSG && client->bootp) {
|
||||||
r = DHCP_ACK; /* BOOTP messages don't have a DHCP message type option */
|
/* BOOTP messages don't have a DHCP message type option */
|
||||||
|
log_dhcp_client(client, "received BOOTREQUEST");
|
||||||
|
r = DHCP_ACK;
|
||||||
|
}
|
||||||
else if (r < 0)
|
else if (r < 0)
|
||||||
return log_dhcp_client_errno(client, r, "Failed to parse DHCP options, ignoring: %m");
|
return log_dhcp_client_errno(client, r, "Failed to parse DHCP options, ignoring: %m");
|
||||||
|
|
||||||
@ -1649,7 +1652,7 @@ static int client_handle_offer_or_rapid_ack(sd_dhcp_client *client, DHCPMessage
|
|||||||
dhcp_lease_unref_and_replace(client->lease, lease);
|
dhcp_lease_unref_and_replace(client->lease, lease);
|
||||||
|
|
||||||
if (client->lease->rapid_commit || client->bootp) {
|
if (client->lease->rapid_commit || client->bootp) {
|
||||||
log_dhcp_client(client, "ACK");
|
log_dhcp_client(client, client->bootp ? "BOOTREPLY" : "ACK");
|
||||||
return SD_DHCP_CLIENT_EVENT_IP_ACQUIRE;
|
return SD_DHCP_CLIENT_EVENT_IP_ACQUIRE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user