From 271bc4b2f2991ef5306a229495a7a880ec5f1f9b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 9 Feb 2020 12:03:53 +0100 Subject: [PATCH] Net: When routing to loopback, use the loopback adapter's MAC address Otherwise the routing decision gets interpreted as "host unreachable." --- Kernel/Net/Routing.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Net/Routing.cpp b/Kernel/Net/Routing.cpp index 17149c7aff..cf8374c907 100644 --- a/Kernel/Net/Routing.cpp +++ b/Kernel/Net/Routing.cpp @@ -46,7 +46,7 @@ bool RoutingDecision::is_zero() const RoutingDecision route_to(const IPv4Address& target, const IPv4Address& source) { if (target[0] == 127) - return { LoopbackAdapter::the(), {} }; + return { LoopbackAdapter::the(), LoopbackAdapter::the().mac_address() }; auto target_addr = target.to_u32(); auto source_addr = source.to_u32();