diff options
author | Maciej <sppmacd@pm.me> | 2022-05-07 14:59:34 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-05-26 21:47:27 +0100 |
commit | e14d4482a18f250787cbf64bae596de1f7278d8d (patch) | |
tree | befeec29406a42cd0d75bb04d50ab8a900740cce /Userland/Services/DHCPClient/DHCPv4Client.h | |
parent | 01c7158ffe4719dc1cf74c25675e6c7d73e9e2ec (diff) | |
download | serenity-e14d4482a18f250787cbf64bae596de1f7278d8d.zip |
DHCPClient: Don't discover interfaces other than given by default
Now, the caller needs to give interface names in command-line arguments.
The DHCPClient will perform DHCP discovery only on these adapters. The
service now immediately closes when no interfaces were given.
We don't check if interface has already IP address assigned; we just
reset it to zero so that DHCP resolution will not fail.
Diffstat (limited to 'Userland/Services/DHCPClient/DHCPv4Client.h')
-rw-r--r-- | Userland/Services/DHCPClient/DHCPv4Client.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Services/DHCPClient/DHCPv4Client.h b/Userland/Services/DHCPClient/DHCPv4Client.h index 6e7146d36a..7cf6fb1392 100644 --- a/Userland/Services/DHCPClient/DHCPv4Client.h +++ b/Userland/Services/DHCPClient/DHCPv4Client.h @@ -54,10 +54,11 @@ public: static ErrorOr<Interfaces> get_discoverable_interfaces(); private: - explicit DHCPv4Client(); + explicit DHCPv4Client(Vector<String> interfaces_with_dhcp_enabled); void try_discover_ifs(); + Vector<String> m_interfaces_with_dhcp_enabled; HashMap<u32, OwnPtr<DHCPv4Transaction>> m_ongoing_transactions; RefPtr<Core::UDPServer> m_server; RefPtr<Core::Timer> m_check_timer; |