6lowpan: do not fill neighbor cache from random packets

Equivalent of 6210612be047ee706ac729015cdbc2581e6ae9a3 for 6lowpan
master
Dario Nieuwenhuis 2021-10-07 04:54:09 +02:00
parent a0b9fb6ebc
commit c9712939fb
1 changed files with 0 additions and 16 deletions

View File

@ -1136,22 +1136,6 @@ impl<'a> InterfaceInner<'a> {
let payload = iphc_packet.payload();
let ip_repr = IpRepr::Sixlowpan(iphc_repr);
// Fill the neighbor cache from IP header of unicast frames.
let ip_addr = ip_repr.src_addr();
if self.in_same_network(&ip_addr)
&& self
.neighbor_cache
.as_mut()
.unwrap()
.lookup(&ip_addr, cx.now)
.found()
{
self.neighbor_cache.as_mut().unwrap().fill(
ip_addr,
ieee802154_repr.src_addr.unwrap().into(), // TODO(thvdveld): Add checks before calling unwrap
cx.now,
);
}
// Currently we assume the next header is a UDP, so we mark all the rest with todo.
match iphc_repr.next_header {