Skip to content
Snippets Groups Projects
Commit af26c2a0 authored by Arnaud Ebalard's avatar Arnaud Ebalard
Browse files

Imported old code from MOBISEND ANR project providing implementation for

various IPv6 Neighbor Discovery attacks referenced in RFC 3756 (IPv6
Neighbor Discovery (ND) Trust Models and Threats). Integration work in
recent version and associated tests done by Guillaume!
parent 48ac7e53
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
......@@ -648,6 +648,16 @@ def in6_isincluded(addr, prefix, plen):
zero = inet_pton(socket.AF_INET6, prefix)
return zero == in6_and(temp, pref)
def in6_isllsnmaddr(str):
"""
Return True if provided address is a link-local solicited node
multicast address, i.e. belongs to ff02::1:ff00:0/104. False is
returned otherwise.
"""
temp = in6_and("\xff"*13+"\x00"*3, inet_pton(socket.AF_INET6, str))
temp2 = '\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00\x00'
return temp == temp2
def in6_isdocaddr(str):
"""
Returns True if provided address in printable format belongs to
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment