diff options
author | AnotherTest <ali.mpfard@gmail.com> | 2020-04-04 14:33:47 +0430 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-04 12:23:46 +0200 |
commit | 2ea934bcfd0b97e89308431b32bdce0845debe6b (patch) | |
tree | 4cc67643d3e4806871b77583704456ceecdb587f /Kernel | |
parent | 8780151155d3cd12019ef9db5e86aae0408bf198 (diff) | |
download | serenity-2ea934bcfd0b97e89308431b32bdce0845debe6b.zip |
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 :)
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Net/NetworkTask.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |