1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +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:
AnotherTest 2021-02-15 21:38:05 +03:30 committed by Andreas Kling
parent 3440dbb1fc
commit ce3b24723a

View file

@ -276,6 +276,7 @@ void DHCPv4Client::dhcp_request(DHCPv4Transaction& transaction, const DHCPv4Pack
DHCPv4Packet& packet = builder.peek();
packet.set_op(DHCPv4Op::BootRequest);
packet.ciaddr() = offer.yiaddr();
packet.set_htype(1); // 10mb ethernet
packet.set_hlen(sizeof(MACAddress));
packet.set_xid(offer.xid());