1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:55:06 +00:00

Kernel: Do not reject broadcast UDP packets right away

This patch relaxes how we think about UDP packets being "for us" a bit;
the proper way to handle this would be to also check if the matched
socket has SO_BROADCAST set, but we don't have that :)
This commit is contained in:
AnotherTest 2020-04-04 14:33:47 +04:30 committed by Andreas Kling
parent 8780151155
commit 2ea934bcfd

View file

@ -288,7 +288,7 @@ void handle_udp(const IPv4Packet& ipv4_packet)
}
auto adapter = NetworkAdapter::from_ipv4_address(ipv4_packet.destination());
if (!adapter) {
if (!adapter && ipv4_packet.destination() != IPv4Address(255, 255, 255, 255)) {
klog() << "handle_udp: this packet is not for me, it's for " << ipv4_packet.destination().to_string().characters();
return;
}