Skip to content

feat(protocols): bind FRAD's and GRE's standard registry values (#2649) - #2667

Merged
JarryShaw merged 1 commit into
mainfrom
feat/2649-bind-frad-gre
Nov 2, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
feat/2649-bind-frad-gre

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • feat — adds a feature

Description of your pull request and other information

FRAD's and GRE's standard registry values are bound, so captures carrying them parse through the dissector instead of as Raw.

  • LinkType.FRELAY (107) → FRAD in Frame.__proto__ and PCAPNG.__proto__.
  • TransType.GRE (47) → GRE in Internet.__proto__. That covers IPv4, IPv6 and every layer sharing that table. GRE's placement under protocols.link follows protocol-layer-placement.rst's tunnelling rule.
  • Tests and docs:
    • The reachability audit's UNBOUND table is empty.
    • The dispatch generator gains a case for each new binding, and every other case is byte-identical.
    • The docstrings and docs pages name both carriers.
  • Analysis now follows the tunnel: with reassembly and tracing on, TCP inside GRE-in-IP reassembles under its inner addresses, and fragmented GRE datagrams reassemble to a parsed GRE layer.

A Sonnet cross-review checked GRE over IPv4 and IPv6 against scapy and tshark: all agree, apart from version 1 and first fragments, which differ by design. Its docs requests are in this head. Two registration tests move from L2TP's 115 to RFC 3692's experimental 254, so binding L2TPv3 later cannot break them.

Closes #2649

- Frame.__proto__ and PCAPNG.__proto__ bind LinkType.FRELAY to FRAD, so a
  LINKTYPE_FRELAY capture parses through FRAD rather than as Raw.
- Internet.__proto__ binds TransType.GRE to GRE, so IPv4 and IPv6 hand
  protocol 47 to GRE, whose checksum is verified behind either.
- The reachability test's UNBOUND table drops both entries; the internet,
  pcap-frame and pcapng-frame dispatch families probe the bound keys.
- ProtocolCodeEndToEndTests registers under the RFC 3692 experimental
  TransType 254 in place of TransType.GRE.
- FRAD's and GRE's pages, module and schema docstrings, GRE.__index__ and
  the roadmap name both carriers; gre.rst says analysis follows the tunnel.

Tests: test_frad_gre_binding_2649_unit, reachability and dispatch registry
fail without the fix and pass with it; the dispatch report and a capture
differential against main change only the 107 and 47 cases.
@JarryShaw JarryShaw added this to the PyPCAPKit v1.6 milestone Nov 2, 2026
@JarryShaw JarryShaw added feat Pull requests that add a new capability (feat: subject prefix) review: good-to-go Cross-review at the current head says ready; CI state is separate labels Nov 2, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 8548b0055. A Sonnet cross-review confirmed the three bindings and that every other dispatch case is byte-identical. It checked GRE against scapy and tshark across IPv4, IPv6 and extension headers, and confirmed the new tests fail on main. Its docs requests are in this head.

Interaction with #2653: once both land, GRE behind IP must not use the frame's cut length. #2653's next round fixes that on its side.

@JarryShaw JarryShaw moved this to In review in PyPCAPKit Nov 2, 2026
@JarryShaw
JarryShaw merged commit 65a2b41 into main Nov 2, 2026
61 of 62 checks passed
@JarryShaw
JarryShaw deleted the feat/2649-bind-frad-gre branch November 2, 2026 17:42
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Nov 2, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Nov 2, 2026
JarryShaw added a commit that referenced this pull request Nov 2, 2026
…he cut-frame fixes and GRE's bindings into 1.6.0 (#2449)

- Breaking: TCP, UDP and SCTP makers (#2670) and PCAP-NG's (#2671) raise
  on a value a field cannot hold, where 1.5.x wrote it masked; each entry
  gives the old and new values. The TTL Diff wraps as before.
- Changed: __index__ returns the LinkType, EtherType, TransType or AppType
  value, ports as ints (#2652); only Create Release waits for a deployment
  approval (#2658). The conventions entry records the index rule.
- Fixed: a cut HTTP/2 SETTINGS frame parses and rebuilds; HTTPv2.make
  takes frame_length (#2666).
- Folded into unreleased entries: FRAD at LinkType 107 and GRE at IP
  protocol 47 (#2667); cut IGMPv3 messages and num_group_records (#2662,
  #2672); Linux_ARPHRD (#2663); DCCP's range checks (#2670); a cut GRE
  frame is TRUNCATED, replacing fold-12's INVALID note, and frame_length
  in pcapkit.utilities.contextvars (#2668).
- No entry for _make_sint's private allow_unsigned, ARP's private
  PAT_MAC_ADDR, or the test- and docs-only d728873, 326a6cf,
  fc80fb1, a37edf1 and 2766707.
- CHANGELOG.md regenerated; util/changelog_md.py --check passes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat Pull requests that add a new capability (feat: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

feat(protocols): bind FRAD's and GRE's standard registry values

1 participant