IPv6: `no matching routes` despite `any_ip` set to `true
I have an interface with `set_any_ip` set to `true`.
However, it cannot be received when there is no route, as it can be clearly seen in the relevant code:
```rust
if self
.routes
.lookup(&IpAddress::Ipv6(ipv6_repr.dst_addr), self.now)
.is_none_or(|router_addr| !self.has_ip_addr(router_addr))
{
net_trace!("Rejecting IPv6 packet; no matching routes");
return None;
}
```
It looks like the `any_ip` boolean is not taken into account in this statement.
Here is an example:
```rust
let mut tun = TunTapInterface::new("tun0", Medium::Ip).unwrap();
let config = iface::Config::new(HardwareAddress::Ip);
let mut iface = Interface::new(config, &mut tun, Instant::now());
iface.set_any_ip(true);
// Now create your sockets and poll.
```
1 条评论