You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(sctp): octets after the last whole chunk make the packet fail to parse #1468
Bug. Any octets left after the last complete SCTP chunk make the whole packet fail to parse, so it has no round trip at all.
Repro on main (94ae9664c):
raw=struct.pack('!HHII', 1, 2, 0, 0) +struct.pack('!BBH', 11, 0, 4) # COOKIE ACKSCTP(raw, len(raw)) # parses; from_data rebuilds exactlySCTP(raw+b'x', len(raw) +1) # ProtocolError: Field chunks has an option that runs past the end of the data
The same error comes back with 3 and with 4 trailing octets.
SCTP has no packet-length field, so these octets cannot be told apart from a chunk that has been cut short. Per the #1458 ruling (record, don't reject), the expected behaviour is that the packet parses, the leftover octets are kept as captured (for example as trailer, like #1431/#1460/#1467 do), and the rebuild is byte-exact.
Activity
JarryShaw commentedon Oct 9, 2026
A worker is on it now, on branch
fix/1468-sctp-stray-octets.fix(sctp)!: keep the octets after the last whole chunk as captured (#…