Przeglądaj źródła

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 :)
AnotherTest 5 lat temu
rodzic
commit
2ea934bcfd
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Kernel/Net/NetworkTask.cpp

+ 1 - 1
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;
     }