mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +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
Notes:
sideshowbarker
2024-07-18 22:12:03 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/cc889b39760 Pull-request: https://github.com/SerenityOS/serenity/pull/5362 Reviewed-by: https://github.com/bugaevc
1 changed files with 2 additions and 0 deletions
|
@ -286,6 +286,8 @@ void DHCPv4Client::dhcp_request(DHCPv4Transaction& transaction, const DHCPv4Pack
|
|||
|
||||
// set packet options
|
||||
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();
|
||||
|
||||
// broadcast the "request" request
|
||||
|
|
Loading…
Reference in a new issue