mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +00:00
DHCPClient: Set the client IP field of the DHCP DISCOVER message
This is the field that tells the DHCP server which IP we want, not setting it is quite silly :P
This commit is contained in:
parent
3440dbb1fc
commit
ce3b24723a
1 changed files with 1 additions and 0 deletions
|
@ -276,6 +276,7 @@ void DHCPv4Client::dhcp_request(DHCPv4Transaction& transaction, const DHCPv4Pack
|
||||||
|
|
||||||
DHCPv4Packet& packet = builder.peek();
|
DHCPv4Packet& packet = builder.peek();
|
||||||
packet.set_op(DHCPv4Op::BootRequest);
|
packet.set_op(DHCPv4Op::BootRequest);
|
||||||
|
packet.ciaddr() = offer.yiaddr();
|
||||||
packet.set_htype(1); // 10mb ethernet
|
packet.set_htype(1); // 10mb ethernet
|
||||||
packet.set_hlen(sizeof(MACAddress));
|
packet.set_hlen(sizeof(MACAddress));
|
||||||
packet.set_xid(offer.xid());
|
packet.set_xid(offer.xid());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue