Quellcode durchsuchen

Fix assert with any_ip + broadcast dst_addr. Fixes #533

Dario Nieuwenhuis vor 3 Jahren
Ursprung
Commit
21e0a30d64
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      src/iface/interface.rs

+ 1 - 0
src/iface/interface.rs

@@ -1239,6 +1239,7 @@ impl<'a> InterfaceInner<'a> {
             // Ignore IP packets not directed at us, or broadcast, or any of the multicast groups.
             // If AnyIP is enabled, also check if the packet is routed locally.
             if !self.any_ip
+                || !ipv4_repr.dst_addr.is_unicast()
                 || self
                     .routes
                     .lookup(&IpAddress::Ipv4(ipv4_repr.dst_addr), cx.now)