mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
Kernel: Don't go through ARP for IP broadcast messages
This commit is contained in:
parent
ce13b258ca
commit
4043e770e5
1 changed files with 6 additions and 0 deletions
|
@ -205,6 +205,12 @@ RoutingDecision route_to(const IPv4Address& target, const IPv4Address& source, c
|
||||||
return { nullptr, {} };
|
return { nullptr, {} };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If it's a broadcast, we already know everything we need to know.
|
||||||
|
// FIXME: We should also deal with the case where `target_addr` is
|
||||||
|
// a broadcast to a subnet rather than a full broadcast.
|
||||||
|
if (target_addr == 0xffffffff && matches(adapter))
|
||||||
|
return { adapter, { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff } };
|
||||||
|
|
||||||
{
|
{
|
||||||
LOCKER(arp_table().lock());
|
LOCKER(arp_table().lock());
|
||||||
auto addr = arp_table().resource().get(next_hop_ip);
|
auto addr = arp_table().resource().get(next_hop_ip);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue