diff options
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Services/NetworkServer/main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Userland/Services/NetworkServer/main.cpp b/Userland/Services/NetworkServer/main.cpp index db93a076ec..14ea3e1aad 100644 --- a/Userland/Services/NetworkServer/main.cpp +++ b/Userland/Services/NetworkServer/main.cpp @@ -83,8 +83,14 @@ ErrorOr<int> serenity_main(Main::Arguments) MUST(Core::command("route"sv, { "add", "-n", "0.0.0.0", "-m", "0.0.0.0", "-g", config.ipv4_gateway, "-i", ifname }, {})); } } + } else { + // FIXME: Propagate errors + dbgln("Disabling interface {}", ifname); + MUST(Core::command("route", { "del", "-n", "0.0.0.0", "-m", "0.0.0.0", "-i", ifname }, {})); + MUST(Core::command("ifconfig", { "-a", ifname.characters(), "-i", "0.0.0.0", "-m", "0.0.0.0" }, {})); } }); + if (!interfaces_with_dhcp_enabled.is_empty()) { dbgln("Running DHCPClient for interfaces: {}", interfaces_with_dhcp_enabled); Vector<char*> args; |