Dave Wallace | cf9356d | 2024-07-23 01:28:19 -0400 | [diff] [blame] | 1 | diff --git a/scapy/contrib/ikev2.py b/scapy/contrib/ikev2.py |
| 2 | index 7799fd1e..f81af7ac 100644 |
| 3 | --- a/scapy/contrib/ikev2.py |
| 4 | +++ b/scapy/contrib/ikev2.py |
| 5 | @@ -607,12 +607,16 @@ class IKEv2_payload_TSr(IKEv2_class): |
| 6 | |
| 7 | class IKEv2_payload_Delete(IKEv2_class): |
| 8 | name = "IKEv2 Vendor ID" |
| 9 | + name = "IKEv2 delete payload" |
| 10 | overload_fields = {IKEv2: {"next_payload": 42}} |
| 11 | fields_desc = [ |
| 12 | ByteEnumField("next_payload", None, IKEv2_payload_type), |
| 13 | ByteField("res", 0), |
| 14 | - FieldLenField("length", None, "vendorID", "H", adjust=lambda pkt, x:x + 4), # noqa: E501 |
| 15 | - StrLenField("vendorID", "", length_from=lambda x:x.length - 4), |
| 16 | + FieldLenField("length", None, "SPIs", "H", adjust=lambda pkt, x:x + 8), # noqa: E501 |
| 17 | + ByteEnumField("proto", 1, {1: "IKEv2", 2: "AH", 3: "ESP"}), |
| 18 | + ByteField("SPIsize", 0), |
| 19 | + ShortField("SPInum", 0), |
| 20 | + StrLenField("SPIs", "", length_from=lambda x: x.length - 8), |
| 21 | ] |
| 22 | |