Filip Tehlar | 558607d | 2020-07-16 07:25:56 +0000 | [diff] [blame] | 1 | diff --git a/scapy/contrib/ikev2.py b/scapy/contrib/ikev2.py |
| 2 | index 60b20480..a071ffc7 100644 |
| 3 | --- a/scapy/contrib/ikev2.py |
| 4 | +++ b/scapy/contrib/ikev2.py |
| 5 | @@ -608,13 +608,16 @@ class IKEv2_payload_TSr(IKEv2_class): |
| 6 | |
| 7 | |
| 8 | class IKEv2_payload_Delete(IKEv2_class): |
| 9 | - name = "IKEv2 Vendor ID" |
| 10 | + name = "IKEv2 delete payload" |
| 11 | overload_fields = {IKEv2: {"next_payload": 42}} |
| 12 | fields_desc = [ |
| 13 | ByteEnumField("next_payload", None, IKEv2_payload_type), |
| 14 | ByteField("res", 0), |
| 15 | - FieldLenField("length", None, "vendorID", "H", adjust=lambda pkt, x:x + 4), # noqa: E501 |
| 16 | - StrLenField("vendorID", "", length_from=lambda x:x.length - 4), |
| 17 | + FieldLenField("length", None, "SPIs", "H", adjust=lambda pkt, x:x + 8), # noqa: E501 |
| 18 | + ByteEnumField("proto", 1, {1: "IKEv2", 2: "AH", 3: "ESP"}), |
| 19 | + ByteField("SPIsize", 0), |
| 20 | + ShortField("SPInum", 0), |
| 21 | + StrLenField("SPIs", "", length_from=lambda x: x.length - 8), |
| 22 | ] |
| 23 | |
| 24 | |