From b5d49cd73a38b87d2a62a74452d3cb0932e6aa7b Mon Sep 17 00:00:00 2001
From: Jochen Bartl <jochen.bartl@gmail.com>
Date: Tue, 18 May 2010 00:07:57 +0200
Subject: [PATCH] Fixed size of reserved field in ICMPv6 ND Redirect Option
 header

Field size was changed from 2 to 6 bytes, according to the RFC.
http://tools.ietf.org/html/rfc2461#page-31
---
 scapy/layers/inet6.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scapy/layers/inet6.py b/scapy/layers/inet6.py
index f30ac79a..a94a15d5 100644
--- a/scapy/layers/inet6.py
+++ b/scapy/layers/inet6.py
@@ -1487,7 +1487,7 @@ class ICMPv6NDOptRedirectedHdr(_ICMPv6NDGuessPayload, Packet):
     fields_desc = [ ByteField("type",4),
                     FieldLenField("len", None, length_of="pkt", fmt="B",
                                   adjust = lambda pkt,x:(x+4)/8),
-                    XShortField("res",0),
+                    StrFixedLenField("res", "\x00"*6, 6),
                     TruncPktLenField("pkt", "", IPv6, 4,
                                      length_from = lambda pkt: 8*pkt.len-4) ]
 
-- 
GitLab