Skip to content

Conversation

@philipch07
Copy link
Contributor

@philipch07 philipch07 commented Oct 19, 2025

Description

  • Updates packet.go to conform to RFC 9260.
  • Adds fuzz tests for packet un/marshalling behavior.

Note: The chunk test is modified since it uses packets, which has changed.

Reference issue

A part of #402. Split from #406.

@philipch07 philipch07 force-pushed the pch07/update-packet-to-rfc-9260 branch from 2fd889e to 46720cf Compare October 19, 2025 00:58
@codecov
Copy link

codecov bot commented Oct 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.10%. Comparing base (c875185) to head (561cd4a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #407      +/-   ##
==========================================
+ Coverage   81.77%   82.10%   +0.32%     
==========================================
  Files          51       51              
  Lines        4522     4520       -2     
==========================================
+ Hits         3698     3711      +13     
+ Misses        680      666      -14     
+ Partials      144      143       -1     
Flag Coverage Δ
go 82.10% <100.00%> (+0.32%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@philipch07 philipch07 force-pushed the pch07/update-packet-to-rfc-9260 branch 2 times, most recently from 2ea6476 to 121a82f Compare October 19, 2025 03:17
packet.go Outdated
for _, c := range p.chunks {
switch c.(type) {
case *chunkInit, *chunkCookieEcho:
doChecksum = false
Copy link
Member

@JoeTurki JoeTurki Oct 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about having state / side effect in marshal is this necessary to do here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this, I was messing with some variable names and accidentally left this in. I changed it to use a helper so it's a little more straightforward (and it avoids manipulating the input).

@philipch07 philipch07 force-pushed the pch07/update-packet-to-rfc-9260 branch from 121a82f to 91865dc Compare October 19, 2025 04:59
@philipch07 philipch07 force-pushed the pch07/update-packet-to-rfc-9260 branch from 91865dc to 561cd4a Compare October 19, 2025 05:02
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.

2 participants