ethernet-padding - #1787
Conversation
52f1d7e to
56a958f
Compare
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (2)
Included review availability: 4 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. 📝 WalkthroughWalkthroughChangesTransport payload checksum bounds
Merge Risk: ⚪ Minimal · up to This change restores transport-checksum behavior for Ethernet padding inside VXLAN tunnels and adds properties for that behavior; no actionable merge-blocking risk remains based on the supplied evidence. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
56a958f to
f091593
Compare
f091593 to
4c19266
Compare
4c19266 to
51d86a5
Compare
mvachhar
left a comment
There was a problem hiding this comment.
Please fix teh commit message to mention that this got undone by a rebased PR so we are just redoing it. Probably should refer to the original commits that got merged.
Limit transport checksums to the payload length declared by the IP header so Ethernet padding is never treated as payload. Restores the fix from d85bdfa, accidentally reverted by 4b91628 during a rebase. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Daniel Noland <daniel@githedgehog.com>
Generate payloads and arbitrary trailing bytes for TCP, UDP, and a VXLAN round trip. Build the tunnel with `Packet::vxlan_encap` so the fixture follows production and verifies that padding never affects transport checksums. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Daniel Noland <daniel@githedgehog.com>
51d86a5 to
bb5cd4c
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The checksum bounding change is localized and well-covered by new regression/property tests, with only a minor unused-import nit noted.
Pull request overview
This PR restores checksum calculation behavior by ensuring transport checksums are computed only over the IP-declared transport payload length (excluding trailing bytes such as Ethernet padding), and adds tests to lock in the expected behavior—especially for inner frames carried within VXLAN where padding is observed in practice.
Changes:
- Bound
Packet::update_checksums()to the computed transport payload length before recalculating checksums. - Added
Headers::transport_payload_len()helper to derive the payload length from IP payload length minus extension + transport header sizes. - Added targeted and property-based tests covering Ethernet padding/trailing octets, including VXLAN inner frames.
File summaries
| File | Description |
|---|---|
| net/src/packet/mod.rs | Truncates checksum input to the transport payload length and adds padding/trailing-octet regression/property tests (including VXLAN inner frames). |
| net/src/headers/mod.rs | Introduces a helper to compute transport payload length from parsed header lengths to support bounded checksum updates. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Restores the transport-checksum fix that reached
mainon 2026-08-29 and was undone on2026-09-01, and pins the behaviour with properties that cover the only way the fabric actually meets ethernet padding: inside a VXLAN tunnel.