From 2ea934bcfd0b97e89308431b32bdce0845debe6b Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Sat, 4 Apr 2020 14:33:47 +0430 Subject: [PATCH] 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 :) --- Kernel/Net/NetworkTask.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Net/NetworkTask.cpp b/Kernel/Net/NetworkTask.cpp index 3cd116e1ef..62108e7b68 100644 --- a/Kernel/Net/NetworkTask.cpp +++ b/Kernel/Net/NetworkTask.cpp @@ -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; }