+from vrf import VRFState
+
+
+def is_ipv6_misc_ext(p):
+ """ Is packet one of uninteresting IPv6 broadcasts (extended to filter out
+ ICMPv6 Neighbor Discovery - Neighbor Advertisement packets too)? """
+ if p.haslayer(ICMPv6ND_RA):
+ if in6_ismaddr(p[IPv6].dst):
+ return True
+ if p.haslayer(ICMPv6ND_NS):
+ if in6_isllsnmaddr(p[IPv6].dst):
+ return True
+ if p.haslayer(IPv6ExtHdrHopByHop):
+ for o in p[IPv6ExtHdrHopByHop].options:
+ if isinstance(o, RouterAlert):
+ return True
+ return False