Repository navigation
Closed
Labels
fixPull requests that fix a defect (fix: subject prefix)Pull requests that fix a defect (fix: subject prefix)
Milestone
Description
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) inpcapkit/foundation/reassembly/tcp.py, read inTCP.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 reportPARTIAL. Its comment picks 16 MiB from Linux'stcp_rmemand notes RFC 7323 allows windows to2 ** 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).- It is also a tunable outside
pcapkit/utilities/config.pywith noPCAPKIT_*variable (feat(utilities): one config module for the tunable limits (PCAPKIT_* environment variables), and one home per duplicated protocol constant #1726), but feat(utilities): one config module for the tunable limits (PCAPKIT_* environment variables), and one home per duplicated protocol constant #1726's inventory does not list it, so that half is weaker than point 4. On fix(reassembly): pin DTLS handshake buffers at declared message length #2469 the owner said TCP is not capped, since the RFC defines no cap.
Decision needed: does the cap stay?
- Drop it: a segment always merges, bounded only by the sequence space.
- Keep it as a limit in
config.py(PCAPKIT_*,-1= no limit, feat(utilities): one config module for the tunable limits (PCAPKIT_* environment variables), and one home per duplicated protocol constant #1726), default unchanged, and note on the page that it is a safety limit, not a reassembly rule. - Keep it as is, and record the exception on reassembly-integration.rst.
Recommendation: 2, because the wide gap is a memory-amplification risk thatconfig.pyalready handles this way (PCAPKIT_MAX_ZERO_PAD_LENGTH), and-1gives point 4 its uncapped mode.
Fix: on 2: add the variable, read it inTCP.reassembly, updateTCP.__window__'s docs, test both sides of the cap and-1. It editsconfig.py(also edited by feat(protocols)!: verify and compute one's-complement checksums (#2470) #2543) and the page (also edited by refactor(foundation): route DTLS reassembly via toolkit and analysis (#2496) #2528).
Metadata
Metadata
Assignees
Labels
fixPull requests that fix a defect (fix: subject prefix)Pull requests that fix a defect (fix: subject prefix)
Projects
- StatusShow more project fieldsDone
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…