From 53d006b864348dded306cbed9c4d240e733927fb Mon Sep 17 00:00:00 2001 From: Kevin Gong Date: Mon, 16 Dec 2024 10:51:23 +0800 Subject: [PATCH] Fix Segment Routing Pad1 TLV definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In RFC 8754, 2.1.1.1, Pad1 is a single byte. --- scapy/layers/inet6.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scapy/layers/inet6.py b/scapy/layers/inet6.py index f1ecc210c06..24ac5b61aa2 100644 --- a/scapy/layers/inet6.py +++ b/scapy/layers/inet6.py @@ -1047,10 +1047,8 @@ class IPv6ExtHdrSegmentRoutingTLVEgressNode(IPv6ExtHdrSegmentRoutingTLV): class IPv6ExtHdrSegmentRoutingTLVPad1(IPv6ExtHdrSegmentRoutingTLV): name = "IPv6 Option Header Segment Routing - Pad1 TLV" - # RFC8754 sect 2.1.1.1 - fields_desc = [ByteEnumField("type", 0, _segment_routing_header_tlvs), - FieldLenField("len", None, length_of="padding", fmt="B"), - StrLenField("padding", b"\x00", length_from=lambda pkt: pkt.len)] # noqa: E501 + # RFC8754 sect 2.1.1.1, Pad1 is a single byte + fields_desc = [ByteEnumField("type", 0, _segment_routing_header_tlvs)] class IPv6ExtHdrSegmentRoutingTLVPadN(IPv6ExtHdrSegmentRoutingTLV):