openbsd-ports/net/scapy6/patches/patch-scapy6_py
claudio cff10e3e22 Scapy6 is an extension to Scapy that provides support for IPv6.
A few things may not work correctly but it is usable enough.
OK jasper@
2007-05-05 16:03:05 +00:00

87 lines
3.4 KiB
Plaintext

$OpenBSD: patch-scapy6_py,v 1.1.1.1 2007/05/05 16:03:05 claudio Exp $
--- scapy6.py.orig Thu Apr 26 22:22:17 2007
+++ scapy6.py Sat May 5 16:32:49 2007
@@ -387,7 +387,9 @@ if not LINUX:
# dest,nh,fl,_,_,_,dev = l.split()[:7]
#else:
if 1:
- d,nh,fl,dev = l.split()[:4]
+ d,nh,fl,_,_,_,dev = l.split(None,6)[:7]
+ if 'L' in dev:
+ _,dev = dev.split()
if filter(lambda x: x[2] == dev, lifaddr) == []:
continue
if 'L' in fl: # drop MAC addresses
@@ -2183,7 +2185,7 @@ class ICMPv6EchoRequest(_ICMPv6):
class ICMPv6EchoReply(ICMPv6EchoRequest):
name = "ICMPv6 Echo Reply"
- __metaclass__ = ChangeDefaultValues
+ __metaclass__ = NewDefaultValues
new_default_values = { "type": 129 }
def answers(self, other):
# We could match data content between request and reply.
@@ -2218,7 +2220,7 @@ class _ICMPv6ML(_ICMPv6):
# Option in a Destination Option Header.
class ICMPv6MLQuery(_ICMPv6ML): # RFC 2710
name = "MLD - Multicast Listener Query"
- __metaclass__ = ChangeDefaultValues
+ __metaclass__ = NewDefaultValues
new_default_values = {"type": 130, "mrd":10000, "mladdr": "::"} # 10s for mrd
overload_fields = {IPv6: { "dst": "ff02::1", "hlim": 1 }}
def hashret(self):
@@ -2232,7 +2234,7 @@ class ICMPv6MLQuery(_ICMPv6ML): # RFC 2710
# Option in a Destination Option Header.
class ICMPv6MLReport(_ICMPv6ML): # RFC 2710
name = "MLD - Multicast Listener Report"
- __metaclass__ = ChangeDefaultValues
+ __metaclass__ = NewDefaultValues
new_default_values = {"type": 131}
overload_fields = {IPv6: {"hlim": 1}}
# implementer le hashret et le answers
@@ -2245,7 +2247,7 @@ class ICMPv6MLReport(_ICMPv6ML): # RFC 2710
# Option in a Destination Option Header.
class ICMPv6MLDone(_ICMPv6ML): # RFC 2710
name = "MLD - Multicast Listener Done"
- __metaclass__ = ChangeDefaultValues
+ __metaclass__ = NewDefaultValues
new_default_values = {"type": 132}
overload_fields = {IPv6: { "dst": "ff02::2", "hlim": 1}}
@@ -2379,7 +2381,7 @@ class ICMPv6NDOptSrcLLAddr(_ICMPv6NDGuessPayload, Pack
class ICMPv6NDOptDstLLAddr(ICMPv6NDOptSrcLLAddr):
name = "ICMPv6 Neighbor Discovery Option - Destination Link-Layer Address"
- __metaclass__ = ChangeDefaultValues
+ __metaclass__ = NewDefaultValues
new_default_values = { 'type': 2 }
class ICMPv6NDOptPrefixInfo(_ICMPv6NDGuessPayload, Packet):
@@ -2602,7 +2604,7 @@ class ICMPv6ND_NS(_ICMPv6NDGuessPayload, _ICMPv6, Pack
class ICMPv6ND_NA(ICMPv6ND_NS):
name = "ICMPv6 Neighbor Discovery - Neighbor Advertisement"
- __metaclass__ = ChangeDefaultValues
+ __metaclass__ = NewDefaultValues
new_default_values = { 'type': 136, 'R': 1, 'O': 1 }
def answers(self, other):
@@ -2674,7 +2676,7 @@ class ICMPv6NDOptSrcAddrList(_ICMPv6NDGuessPayload, Pa
class ICMPv6NDOptTgtAddrList(ICMPv6NDOptSrcAddrList):
name = "ICMPv6 Inverse Neighbor Discovery Option - Target Address List"
- __metaclass__ = ChangeDefaultValues
+ __metaclass__ = NewDefaultValues
new_default_values = { "type": 10 }
@@ -2737,7 +2739,7 @@ class LLMNRQuery(Packet):
class LLMNRResponse(LLMNRQuery):
name = "Link Local Multicast Node Resolution - Response"
- __metaclass__ = ChangeDefaultValues
+ __metaclass__ = NewDefaultValues
new_default_values = {"qr": 1}
fields_desc = []