Skip to content

dtls: prepare shared packet interception and IPv6 prerequisites (1/18) - #1469

Draft
mgonzalezlopezudc wants to merge 3 commits into
inet-framework:masterfrom
mgonzalezlopezudc:review/dtls-01-shared-prerequisites
Draft

mgonzalezlopezudc wants to merge 3 commits into
inet-framework:masterfrom
mgonzalezlopezudc:review/dtls-01-shared-prerequisites

Conversation

@mgonzalezlopezudc

Copy link
Copy Markdown
Contributor

DTLS needs packet-level fault injection and an IPv6 path that honors requests to keep datagrams unfragmented. Typed packet-tap predicates now select actual contents before counting matching packets, and IPv6 drops an oversized datagram carrying a dontFragment request. Ordinary source fragmentation remains covered by controls.

This is series unit 01 of 18, from the approved 53-commit reconstruction. Its base is the pinned upstream master.

All 18 review branches are published. Units 02–18 will be opened incrementally after their predecessors land, unless maintainers provide upstream base refs. The paired statistics PR belongs to unit 06 and preserves the original baseline files and values. Existing PRs #1459 and #1465 remain unchanged.

Exact incremental comparison. Base 476ab0f2fa019c0bcf36d23d9f99ec884ee9393c, head d7f55fbeeea4e5bc99b461b8143336b2850da2db.

flowchart LR
    P[Packet at tap] --> M{Expression and typed predicate match}
    M -->|No| F[Pass without advancing count]
    M -->|Yes| C[Advance occurrence count]
    C --> N{Selected occurrence}
    N -->|Yes| D[Apply requested packet fault]
    N -->|No| F
Loading

Commits

  1. plan: add: traceable DTLS publication sequence. The original DTLS implementation and extensions need bounded review units that preserve their final behavior and evidence. Define the complete 41-commit, 18-PR sequence, source allocation, independently tested preparations and publication dependencies before reconstructing code.
  2. tests: add: select interception targets with typed predicates. Interleaved UDP datagrams need interception by typed packet content as well as an expression. Evaluate both filters before occurrence counting, so nonmatching payloads do not consume the second-match drop. The fixture requires every other matching and nonmatching datagram to arrive.
  3. ipv6: add: honor requests to suppress source fragmentation. An IPv6 application can request an unfragmented datagram, but source fragmentation previously ignored that request. Honor the packet request on immediate and delayed output, report an oversized packet through the existing drop path, and retain ordinary source fragmentation when no prohibition is supplied.

Protocol scenarios and parent comparison

The fixtures and companion reviewer documents describe their real UDP/IP topology, fixed-seed stimulus, observations and limits. The comparison with the immediate parent is source-based unless the record identifies an executed comparison. A missing capability or API is reported as unavailable coverage, and is never counted as an observed parent runtime failure. Existing outcomes retained by a later fixture are controls.

Fixture Stimulus and required observation
Ipv6DontFragmentRequest IPv6 source fragmentation honors the existing FragmentationReq tag. One oversized forbidden UDP datagram drops; one small tagged datagram and one untagged oversized datagram deliver. Neighbor-resolution without an injected delay preserves the tag through its queue.
Ipv6DontFragmentRequestDelayed IPv6 source fragmentation honors the existing FragmentationReq tag. One oversized forbidden UDP datagram drops; one small tagged datagram and one untagged oversized datagram deliver. Neighbor-resolution delay preserves the tag through its queue.
Rfc8200SourceFragmentation RFC 8200 — a source fragments a 1500-octet packet for a 1280-octet link, the router forwards the fragments untouched, and the destination reassembles them. Checks RFC8200-FRAG-3 (must), FRAG-4, FRAG-5 (description; their structure, without the payload length), FRAG-6 (must not), EXT-1, REASM-1, REASM-2 (description) and MTU-4 (must) from doc/project/evidence/standard/rfc8200/catalog.md; also covers HDR-3. The payload length of the fragments is Rfc8200FragmentPayloadLength.test, kept apart so that one wrong field does not hide the reassembly verdicts. The English procedure, the mockup and the size arithmetic are in doc/project/evidence/protocol/ipv6/checks/fragmentation.md#source-fragmentation-and-reassembly; the program steps below map one to one onto its expected observations. Host A's interface to link 1 has MTU 1280; a 1500-octet packet (1452 octets of data) splits into pieces of 1232 and 228 octets, so the last fragment sits at octet offset 1232 (154 units). Mapping of the mockup: host A = hostA, router R = router, host B = hostB. Deviation: a fragment is not dissected beyond its fragment header, so the UDP header of the first fragment (expected observation 1) is read from the chunk sequence by a typed predicate. The fragment offset field of the model counts octets, and the steps compare it in octets (1232 = 154 units of 8).
TypedTapPredicate Typed tap predicates combine with expressions before occurrence counting. Interleaved 100-byte and 200-byte UDP datagrams share a destination. An extra 200-byte datagram uses another destination port and must also pass. Only the second matching 200-byte datagram is dropped; all four 100-byte datagrams and the other two 200-byte datagrams must arrive. This proves nonmatching typed packets do not advance nth(2).

Verification

Both-mode builds and the assigned PR-tip test union passed. Executed fixture counts: protocol / debug: 7, protocol / release: 7. The combined publication evidence and verification record retain exact commands, source/library identities, selectors, seeds, counts, input corrections and execution limits. input and history identity proof maps message-only reconstruction to the exact tested trees.

The identical IPv6 fixtures on the immediate parent produce two behavior failures and one passing ordinary-fragmentation control. The new typed-tap API is absent on its parent, so no runtime failure is claimed there.

Exact PR-tip commands
make MODE=debug -j8
opp_run_protocol_tests --load . -p inet -m debug --no-build --no-concurrent -f '(Ipv6DontFragmentRequest|Ipv6DontFragmentRequestDelayed|Rfc8200SourceFragmentation)\.test$' --result-file /home/miguel/workspace/.codex-artifacts/dtls-publication-20261117/pr01-combined/protocol-debug-ipv6-result.json -w '^tests/protocol/ipv6$'
opp_run_protocol_tests --load . -p inet -m debug --no-build --no-concurrent -f '(Rfc1122ApplicationSourceAddress|Rfc768Checksum|Rfc768DatagramDelivery|TypedTapPredicate)\.test$' --result-file /home/miguel/workspace/.codex-artifacts/dtls-publication-20261117/pr01-combined/protocol-debug-udp-result.json -w '^tests/protocol/udp$'
make MODE=release -j8
opp_run_protocol_tests --load . -p inet -m release --no-build --no-concurrent -f '(Ipv6DontFragmentRequestDelayedPublicationRelease|Ipv6DontFragmentRequestPublicationRelease|Rfc8200SourceFragmentation)\.test$' --result-file /home/miguel/workspace/.codex-artifacts/dtls-publication-20261117/pr01-combined/protocol-release-ipv6-result.json -w '^tests/protocol/ipv6$'
opp_run_protocol_tests --load . -p inet -m release --no-build --no-concurrent -f '(Rfc1122ApplicationSourceAddress|Rfc768Checksum|Rfc768DatagramDelivery|TypedTapPredicate)\.test$' --result-file /home/miguel/workspace/.codex-artifacts/dtls-publication-20261117/pr01-combined/protocol-release-udp-result.json -w '^tests/protocol/udp$'
doc/project/enforcement/check-commits.sh 476ab0f2fa019c0bcf36d23d9f99ec884ee9393c..a762a10b5c14219ee0b49b99194f4b871cbd4e42
doc/project/enforcement/check-classification.sh 476ab0f2fa019c0bcf36d23d9f99ec884ee9393c..a762a10b5c14219ee0b49b99194f4b871cbd4e42
doc/project/enforcement/check-whatsnew.sh 476ab0f2fa019c0bcf36d23d9f99ec884ee9393c..a762a10b5c14219ee0b49b99194f4b871cbd4e42
doc/project/enforcement/check-includes.sh 476ab0f2fa019c0bcf36d23d9f99ec884ee9393c..a762a10b5c14219ee0b49b99194f4b871cbd4e42
doc/project/enforcement/check-ned-params.sh 476ab0f2fa019c0bcf36d23d9f99ec884ee9393c..a762a10b5c14219ee0b49b99194f4b871cbd4e42
doc/project/enforcement/check-source-seals.sh --base 476ab0f2fa019c0bcf36d23d9f99ec884ee9393c --head a762a10b5c14219ee0b49b99194f4b871cbd4e42
doc/project/enforcement/check-seals.sh

The record names the working directory, matching library hashes and raw artifact paths. A reused result is explicitly identified with its input-identity proof.

Baselines and protection

This unit changes no statistical, chart or fingerprint baseline values or pins.

Sealed packet-core sources remain unchanged. The DTLS/TLS/contract/adapter architecture, NED/MSG naming and interface scopes pass. Their global findings are inherited and match the pinned upstream target. The C++ gate retains 49 distinct hand-authored candidates and generated/framework findings, with zero compiler errors; its assessment is in the publication evidence. No global warning-free result or new seal is claimed.

Model limits and delivery

The series models protocol state, retained protected content, sizes and configured processing cost. It does not implement real cryptographic security or establish unrestricted interoperability. This unit provides the capability described above; later units introduce their own dependent behavior.

The original #1459 and #1465 branches and PRs remain unchanged. Upstream submission uses one landing at a time: PR01 targets master, and each later incremental PR follows its predecessor landing or an upstream-maintained base ref. Fork comparison branches do not supply upstream base branches.

Series roadmap

Unit Review scope Exact comparison
PR01 Typed interception and IPv6 fragmentation requests diff
PR02 Processing/replay, TLS content, record representation, local contract and engine shell diff
PR03 Establishment, flight accounting, reassembly and loss recovery diff
PR04 Protected application traffic diff
PR05 Ordered processing continuation and epoch updates diff
PR06 Atomic cancellation, graceful closure and original demonstrations diff
PR07 Shared recovery and modeled tickets diff
PR08 Explicit early-datagram admission diff
PR09 Shared algorithm catalog and endpoint consumers diff
PR10 CID negotiation diff
PR11 Recoverable CID updates diff
PR12 Heartbeat preparation and validated migration diff
PR13 Post-handshake client authentication diff
PR14 Budget state, flight refragmentation and discovery diff
PR15 Legacy records and full handshakes diff
PR16 Legacy abbreviated handshakes diff
PR17 Legacy CID, mobility and discovery diff
PR18 Scenario actions, extended examples and publication acceptance diff

The original DTLS implementation and extensions need bounded review units
that preserve their final behavior and evidence. Define the complete
41-commit, 18-PR sequence, source allocation, independently tested
preparations and publication dependencies before reconstructing code.

Keep the original branches and local edits intact. Separate historical input
results from reconstructed verification, require focused commit checks and
combined PR-tip/final acceptance, and retain the original statistical
baseline with its causal example commit.

Plan: plan/pending/dtls-publication-plan.md
Change: plan | behavior.add | - | dtls-publication
Interleaved UDP datagrams need interception by typed packet content as well
as an expression. Evaluate both filters before occurrence counting, so
nonmatching payloads do not consume the second-match drop. The fixture
requires every other matching and nonmatching datagram to arrive.

Protocol scenarios: TypedTapPredicate. Their companion reviewer documents
specify topology, faults, required observations and limits. Immediate-parent
comparison is source-based unless the linked publication execution record
identifies an actual compatible run. Missing capability is not a runtime
defect observation.

The immediate-parent comparison for these scenarios is source-based unless
the associated comparison record documents execution. New exchanges depend
on the endpoint transition described above. Scenarios retaining earlier
outcomes serve as controls. Exact-parent behavior is otherwise unverified.

- TypedTapPredicate: Typed tap predicates combine with expressions before
  occurrence counting. Interleaved 100-byte and 200-byte UDP datagrams share
  a destination. An extra 200-byte datagram uses another destination port
  and must also pass. Only the second matching 200-byte datagram is dropped;
  all four 100-byte datagrams and the other two 200-byte datagrams must
  arrive. This proves nonmatching typed packets do not advance nth(2).

Plan: plan/pending/dtls-publication-plan.md
Change: tests | behavior.add | test | dtls-publication
An IPv6 application can request an unfragmented datagram, but source
fragmentation previously ignored that request. Honor the packet request on
immediate and delayed output, report an oversized packet through the
existing drop path, and retain ordinary source fragmentation when no
prohibition is supplied.

Protocol scenarios: Ipv6DontFragmentRequest, Ipv6DontFragmentRequestDelayed,
Rfc8200SourceFragmentation. Their companion reviewer documents specify
topology, faults, required observations and limits. Immediate-parent
comparison is source-based unless the linked publication execution record
identifies an actual compatible run. Missing capability is not a runtime
defect observation.

The immediate-parent comparison for these scenarios is source-based unless
the associated comparison record documents execution. New exchanges depend
on the endpoint transition described above. Scenarios retaining earlier
outcomes serve as controls. Exact-parent behavior is otherwise unverified.

- Ipv6DontFragmentRequest: IPv6 source fragmentation honors the existing
  FragmentationReq tag. One oversized forbidden UDP datagram drops; one
  small tagged datagram and one untagged oversized datagram deliver.
  Neighbor-resolution without an injected delay preserves the tag through
  its queue.

- Ipv6DontFragmentRequestDelayed: IPv6 source fragmentation honors the
  existing FragmentationReq tag. One oversized forbidden UDP datagram drops;
  one small tagged datagram and one untagged oversized datagram deliver.
  Neighbor-resolution delay preserves the tag through its queue.

- Rfc8200SourceFragmentation: RFC 8200 — a source fragments a 1500-octet
  packet for a 1280-octet link, the router forwards the fragments untouched,
  and the destination reassembles them. Checks RFC8200-FRAG-3 (must),
  FRAG-4, FRAG-5 (description; their structure, without the payload length),
  FRAG-6 (must not), EXT-1, REASM-1, REASM-2 (description) and MTU-4 (must)
  from doc/project/evidence/standard/rfc8200/catalog.md; also covers HDR-3.
  The payload length of the fragments is Rfc8200FragmentPayloadLength.test,
  kept apart so that one wrong field does not hide the reassembly verdicts.
  The English procedure, the mockup and the size arithmetic are in
  doc/project/evidence/protocol/ipv6/checks/fragmentation.md#source-
  fragmentation-and-reassembly; the program steps below map one to one onto
  its expected observations. Host A's interface to link 1 has MTU 1280; a
  1500-octet packet (1452 octets of data) splits into pieces of 1232 and 228
  octets, ...

Plan: plan/pending/dtls-publication-plan.md
Change: src.networklayer.ipv6 | behavior.add | test whatsnew | dtls-extensions

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant