diff --git a/scapy/layers/inet6.py b/scapy/layers/inet6.py index b585c92ea70..bba6bddda64 100644 --- a/scapy/layers/inet6.py +++ b/scapy/layers/inet6.py @@ -2258,6 +2258,10 @@ def hashret(self): return bytes_encode(self.tgt) + self.payload.hashret() def answers(self, other): + if not isinstance(self.underlayer, IPv6): + return False + if self.underlayer.hlim != 255: + return False return isinstance(other, ICMPv6ND_NS) and self.tgt == other.tgt # associated possible options : target link-layer option, Redirected header