diff options
author | Neale Ranns <nranns@cisco.com> | 2018-02-25 12:27:18 -0800 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2018-03-19 13:09:45 +0000 |
commit | 2bc940272ec75d1094326eafb4a3fa2c614e3a7b (patch) | |
tree | d813084708e143fc9eb6edbca408ba93beadaf41 /test/patches/scapy-2.4/gre.patch | |
parent | f38bef46a3511249f352d18072f97a49f2c5b06c (diff) |
Scapy upgrade to 2.4.0.rc5
- many of the patches fd.io applies in test/patches/2.3.3 are now upstreamed in 2.4
- 2.4 adds support for IGMPv3 which is my main motivation for the upgrade
Change-Id: If2c0a524e3cba320b4a5d8cd07817c6ea2bf0c5a
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'test/patches/scapy-2.4/gre.patch')
-rw-r--r-- | test/patches/scapy-2.4/gre.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/test/patches/scapy-2.4/gre.patch b/test/patches/scapy-2.4/gre.patch new file mode 100644 index 00000000000..74004480291 --- /dev/null +++ b/test/patches/scapy-2.4/gre.patch @@ -0,0 +1,43 @@ +diff --git a/scapy/layers/l2.py b/scapy/layers/l2.py +index 4f491d2..661a5da 100644 +--- a/scapy/layers/l2.py ++++ b/scapy/layers/l2.py +@@ -570,6 +570,20 @@ + return getmacbyip(l3.pdst) + conf.neighbor.register_l3(Ether, ARP, l2_register_l3_arp) + ++ ++class ERSPAN(Packet): ++ name = "ERSPAN" ++ fields_desc = [ BitField("ver",0,4), ++ BitField("vlan",0,12), ++ BitField("cos",0,3), ++ BitField("en",0,2), ++ BitField("t",0,1), ++ BitField("session_id",0,10), ++ BitField("reserved",0,12), ++ BitField("index",0,20), ++ ] ++ ++ + class GRErouting(Packet): + name = "GRE routing informations" + fields_desc = [ ShortField("address_family",0), +--- a/scapy/layers/l2.py ++++ b/scapy/layers/l2.py +@@ -427,6 +427,7 @@ bind_layers( Dot1AD, Dot1AD, type=0x88a8) + bind_layers( Dot1AD, Dot1Q, type=0x8100) + bind_layers( Dot1Q, Dot1AD, type=0x88a8) + bind_layers( Ether, Ether, type=1) ++bind_layers( GRE, ERSPAN, proto=0x88be, seqnum_present=1) + bind_layers( Ether, ARP, type=2054) + bind_layers( CookedLinux, LLC, proto=122) + bind_layers( CookedLinux, Dot1Q, proto=33024) +@@ -441,6 +442,7 @@ bind_layers( GRE, ARP, proto=2054) + bind_layers( GRE, GRErouting, { "routing_present" : 1 } ) + bind_layers( GRErouting, conf.raw_layer,{ "address_family" : 0, "SRE_len" : 0 }) + bind_layers( GRErouting, GRErouting, { } ) ++bind_layers( ERSPAN, Ether) + bind_layers( LLC, STP, dsap=66, ssap=66, ctrl=3) + bind_layers( LLC, SNAP, dsap=170, ssap=170, ctrl=3) + bind_layers( SNAP, Dot1Q, code=33024) |