浏览代码

Fix assert with any_ip + broadcast dst_addr. Fixes #533

Dario Nieuwenhuis 3 年之前
父节点
当前提交
21e0a30d64
共有 1 个文件被更改,包括 1 次插入0 次删除
  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)