Fix Segment Routing Pad1 TLV definition
In RFC 8754, 2.1.1.1, Pad1 is a single byte.
0 1 2 3 4 5 6 7
+-+-+-+-+-+-+-+-+
| Type |
+-+-+-+-+-+-+-+-+
but in the current implementation, Pad1 are three bytes, b'\x00\x01\x00'
raw(IPv6ExtHdrSegmentRoutingTLVPad1())
This PR fixed it.
Hope it can help.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 81.04%. Comparing base (
316945f) to head (1d2ada8). Report is 2 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #4611 +/- ##
=======================================
Coverage 81.04% 81.04%
=======================================
Files 365 365
Lines 88983 88983
=======================================
+ Hits 72116 72120 +4
+ Misses 16867 16863 -4
| Files with missing lines | Coverage Δ | |
|---|---|---|
| scapy/layers/inet6.py | 88.57% <100.00%> (ø) |
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
That's kinda already the case: https://github.com/secdev/scapy/blob/53d006b864348dded306cbed9c4d240e733927fb/scapy/layers/inet6.py#L768-L770
I wonder if there isn't a duplicate here
That's kinda already the case:
https://github.com/secdev/scapy/blob/53d006b864348dded306cbed9c4d240e733927fb/scapy/layers/inet6.py#L768-L770
I wonder if there isn't a duplicate here
Indeed, they are identical functions.
but class Pad1 is for Destination Options and Hop-by-Hop Options.
and class IPv6ExtHdrSegmentRoutingTLVPad1 is for Segment Routing Header TLVs.
In my opinion, it appears they are distinct. I think that Pv6ExtHdrSegmentRoutingTLVPad1 ought to have a unique definition of its own.
Thanks for the PR & sorry for the huge delay !