diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2021-02-15 21:38:05 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-02-17 14:41:36 +0100 |
commit | ce3b24723aec0b8542790f118f10810744c35ba9 (patch) | |
tree | 3336bffcf17965481120303b21de257d7acf0221 /Userland/Services/DHCPClient | |
parent | 3440dbb1fc0b13eb81d25f26ed54f7df4508a459 (diff) | |
download | serenity-ce3b24723aec0b8542790f118f10810744c35ba9.zip |
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
Diffstat (limited to 'Userland/Services/DHCPClient')
-rw-r--r-- | Userland/Services/DHCPClient/DHCPv4Client.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Services/DHCPClient/DHCPv4Client.cpp b/Userland/Services/DHCPClient/DHCPv4Client.cpp index 945b2b54a4..61ee0c60fa 100644 --- a/Userland/Services/DHCPClient/DHCPv4Client.cpp +++ b/Userland/Services/DHCPClient/DHCPv4Client.cpp @@ -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()); |