Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a function to distinguish between long and short header packets #3498

Merged
merged 1 commit into from Aug 11, 2022

Conversation

marten-seemann
Copy link
Member

No functional change expected.

Logically, this function belongs into the wire package.

@codecov
Copy link

codecov bot commented Aug 10, 2022

Codecov Report

Merging #3498 (015ae66) into master (ea9de26) will not change coverage.
The diff coverage is 85.71%.

@@           Coverage Diff           @@
##           master    #3498   +/-   ##
=======================================
  Coverage   85.75%   85.75%           
=======================================
  Files         136      136           
  Lines       10025    10025           
=======================================
  Hits         8596     8596           
  Misses       1051     1051           
  Partials      378      378           
Impacted Files Coverage Δ
internal/wire/header.go 86.96% <80.00%> (ø)
packet_handler_map.go 74.10% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@@ -73,7 +74,7 @@ var _ = Describe("Datagram test", func() {
return false
}
// don't drop Long Header packets
if packet[0]&0x80 == 1 {
Copy link
Member

Choose a reason for hiding this comment

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

Fwiw, the old version here was incorrect.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so, this is selecting long header packets?

Copy link
Member Author

Choose a reason for hiding this comment

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

Now I see it. It would have to be &0x80 == 0x80. Nice one.

@marten-seemann marten-seemann merged commit 80fd1b5 into master Aug 11, 2022
@marten-seemann marten-seemann deleted the is-long-header branch August 15, 2022 09:04
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.

None yet

2 participants