mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
Net: Short-circuit routing to the IPv4 address of a local adapter
This makes it possible to open http://localhost:8000/ in Browser. :^)
This commit is contained in:
@@ -68,6 +68,10 @@ RoutingDecision route_to(const IPv4Address& target, const IPv4Address& source)
|
||||
gateway_adapter = adapter;
|
||||
});
|
||||
|
||||
|
||||
if (local_adapter && target == local_adapter->ipv4_address())
|
||||
return { local_adapter, local_adapter->mac_address() };
|
||||
|
||||
if (!local_adapter && !gateway_adapter) {
|
||||
#ifdef ROUTING_DEBUG
|
||||
kprintf("Routing: Couldn't find a suitable adapter for route to %s\n",
|
||||
|
||||
Reference in New Issue
Block a user