NetworkServer: Enable DHCP on interfaces that are not listed in config

This commit is contained in:
Maciej 2022-07-02 21:41:05 +02:00 committed by Idan Horowitz
parent 544636fd0f
commit 65307cf5cc
Notes: sideshowbarker 2024-07-17 09:44:07 +09:00
2 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,2 @@
[ep1s0]
Enabled=false
[ep0s8]
DHCP=true

View File

@ -54,7 +54,8 @@ ErrorOr<int> serenity_main(Main::Arguments)
InterfaceConfig config;
if (!groups.contains_slow(ifname)) {
dbgln("Config for interface {} doesn't exist, not enabling it", ifname);
dbgln("Config for interface {} doesn't exist, enabling DHCP for it", ifname);
interfaces_with_dhcp_enabled.append(ifname);
} else {
config.enabled = config_file->read_bool_entry(ifname, "Enabled", true);
config.dhcp_enabled = config_file->read_bool_entry(ifname, "DHCP", false);