aboutsummaryrefslogtreecommitdiffstats
path: root/test/patches/scapy-2.4.3/ikev2.patch
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2020-07-16 07:25:56 +0000
committerAndrew Yourtchenko <ayourtch@gmail.com>2020-11-26 15:02:41 +0000
commitdf61e60815b5bf0c2383dafa3c41ed1b60b8a900 (patch)
tree3efb4944992855abe770f6b6767561ade24e9169 /test/patches/scapy-2.4.3/ikev2.patch
parent447f673e75247421c239d88f6ada45b3ff1a47fe (diff)
ikev2: better packet parsing functions
Ticket: VPP-1918 Type: improvement Change-Id: I2bc3e30121697404dcd54f1c2127bd85ccc1029e Signed-off-by: Filip Tehlar <ftehlar@cisco.com> (cherry picked from commit 558607dc3a96232191f413b9bc894524ff85f2a1)
Diffstat (limited to 'test/patches/scapy-2.4.3/ikev2.patch')
-rw-r--r--test/patches/scapy-2.4.3/ikev2.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/patches/scapy-2.4.3/ikev2.patch b/test/patches/scapy-2.4.3/ikev2.patch
new file mode 100644
index 00000000000..be143e8b8c9
--- /dev/null
+++ b/test/patches/scapy-2.4.3/ikev2.patch
@@ -0,0 +1,24 @@
+diff --git a/scapy/contrib/ikev2.py b/scapy/contrib/ikev2.py
+index 60b20480..a071ffc7 100644
+--- a/scapy/contrib/ikev2.py
++++ b/scapy/contrib/ikev2.py
+@@ -608,13 +608,16 @@ class IKEv2_payload_TSr(IKEv2_class):
+
+
+ class IKEv2_payload_Delete(IKEv2_class):
+- name = "IKEv2 Vendor ID"
++ name = "IKEv2 delete payload"
+ overload_fields = {IKEv2: {"next_payload": 42}}
+ fields_desc = [
+ ByteEnumField("next_payload", None, IKEv2_payload_type),
+ ByteField("res", 0),
+- FieldLenField("length", None, "vendorID", "H", adjust=lambda pkt, x:x + 4), # noqa: E501
+- StrLenField("vendorID", "", length_from=lambda x:x.length - 4),
++ FieldLenField("length", None, "SPIs", "H", adjust=lambda pkt, x:x + 8), # noqa: E501
++ ByteEnumField("proto", 1, {1: "IKEv2", 2: "AH", 3: "ESP"}),
++ ByteField("SPIsize", 0),
++ ShortField("SPInum", 0),
++ StrLenField("SPIs", "", length_from=lambda x: x.length - 8),
+ ]
+
+