mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
DHCPClient: Dont set DHCPOption::ServerIdentifier on DHCPRequest
Some real DHCP servers dont set the siaddr field in the DHCPOffer to their IPv4 (and instead leave it blank - 0.0.0.0), which results in the server assuming the DHCPRequest is not directed at him when it has the ServerIdentifier option attached that specifies 0.0.0.0 as the targeted server. So instead we just omit the option and let the DHCP servers decipher the target themselves based on the requested IP.
This commit is contained in:
parent
47fa8d83bb
commit
6b360834f2
1 changed files with 0 additions and 1 deletions
|
@ -287,7 +287,6 @@ 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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue