mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:27:42 +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:
parent
80703ef7d9
commit
db2ede9427
1 changed files with 4 additions and 0 deletions
|
@ -68,6 +68,10 @@ RoutingDecision route_to(const IPv4Address& target, const IPv4Address& source)
|
||||||
gateway_adapter = adapter;
|
gateway_adapter = adapter;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
if (local_adapter && target == local_adapter->ipv4_address())
|
||||||
|
return { local_adapter, local_adapter->mac_address() };
|
||||||
|
|
||||||
if (!local_adapter && !gateway_adapter) {
|
if (!local_adapter && !gateway_adapter) {
|
||||||
#ifdef ROUTING_DEBUG
|
#ifdef ROUTING_DEBUG
|
||||||
kprintf("Routing: Couldn't find a suitable adapter for route to %s\n",
|
kprintf("Routing: Couldn't find a suitable adapter for route to %s\n",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue