mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 13:07:47 +00:00
DHCPClient: Set ServerIdentifier and RequestedAddress in DHCP REQUESTs
Some dhcp servers require these to be there - otherwise, the ack gets dropped somewhere.
This commit is contained in:
parent
ce3b24723a
commit
cc889b3976
1 changed files with 2 additions and 0 deletions
|
@ -286,6 +286,8 @@ void DHCPv4Client::dhcp_request(DHCPv4Transaction& transaction, const DHCPv4Pack
|
||||||
|
|
||||||
// set packet options
|
// set packet options
|
||||||
builder.set_message_type(DHCPMessageType::DHCPRequest);
|
builder.set_message_type(DHCPMessageType::DHCPRequest);
|
||||||
|
builder.add_option(DHCPOption::ServerIdentifier, sizeof(IPv4Address), &offer.siaddr());
|
||||||
|
builder.add_option(DHCPOption::RequestedIPAddress, sizeof(IPv4Address), &offer.yiaddr());
|
||||||
auto& dhcp_packet = builder.build();
|
auto& dhcp_packet = builder.build();
|
||||||
|
|
||||||
// broadcast the "request" request
|
// broadcast the "request" request
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue