mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
Kernel: Don't go through ARP for IP broadcast messages
This commit is contained in:
parent
ce13b258ca
commit
4043e770e5
Notes:
sideshowbarker
2024-07-18 22:12:20 +09:00
Author: https://github.com/alimpfard
Commit: 4043e770e5
Pull-request: https://github.com/SerenityOS/serenity/pull/5362
Reviewed-by: https://github.com/bugaevc
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, {} };
|
||||
}
|
||||
|
||||
// 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());
|
||||
auto addr = arp_table().resource().get(next_hop_ip);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue