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(reassembly): TCP's gap cap (TCP.__window__) has no RFC basis and silently splits a stream #2546
From the 2026-11-01 conventions audit, re-verified on 73add05a3. reassembly-integration.rst, "The Rule" point 4: reassembly follows the RFC's own definition and "adds no timeout, cap or ordering rule the RFC does not call for".
TCP.__window__ = 1 << 24 (16 MiB) in pcapkit/foundation/reassembly/tcp.py, read in TCP.reassembly. A segment that would zero-fill a wider gap submits the buffer and opens a new one: with no SYN the stream splits into two datagrams, with a SYN both halves report PARTIAL. Its comment picks 16 MiB from Linux's tcp_rmem and notes RFC 7323 allows windows to 2 ** 30 (a 1 GiB zero-fill); no RFC calls for the cap (fix(reassembly): TCP completion from per-buffer gaps, mod-2**32 sequence numbers, FIN waits for reordered data #1375).
Owner chose 2, paraphrased: the cap stays as a safety limit, not a reassembly rule.
It moves into pcapkit/utilities/config.py as a PCAPKIT_* variable, with -1 meaning no limit and the 16 MiB default unchanged. TCP.reassembly reads it, and TCP.__window__'s docs say so.
reassembly-integration.rst records it as a safety limit, outside "The Rule" point 4.
Tests cover both sides of the cap and -1.
A worker is dispatched. Any conflict with #2543's config.py additions or #2528's page edit gets resolved at merge.
Activity
JarryShaw commentedon Nov 1, 2026
Yes, do 2
JarryShaw commentedon Nov 1, 2026
Owner chose 2, paraphrased: the cap stays as a safety limit, not a reassembly rule.
pcapkit/utilities/config.pyas aPCAPKIT_*variable, with-1meaning no limit and the 16 MiB default unchanged.TCP.reassemblyreads it, andTCP.__window__'s docs say so.-1.A worker is dispatched. Any conflict with #2543's
config.pyadditions or #2528's page edit gets resolved at merge.fix(reassembly)!: move TCP's gap cap into config as PCAPKIT_TCP_GAP_L…