-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use x/net/ipv4/6 to construct oob info when writing packets #3278
Use x/net/ipv4/6 to construct oob info when writing packets #3278
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Codecov Report
@@ Coverage Diff @@
## master #3278 +/- ##
==========================================
+ Coverage 85.47% 85.69% +0.22%
==========================================
Files 132 132
Lines 9799 9775 -24
==========================================
+ Hits 8375 8376 +1
+ Misses 1048 1024 -24
+ Partials 376 375 -1
Continue to review full report at Codecov.
|
Just wondering, did you check if this works on FreeBSD? (not a requirement for this PR to be merged) |
I only verified that it did not break anything. Unfortunately I don't have a freeBSD setup behind anycast. I'm going to set one up this weekend and can check this in a follow up. I propose if the PR is good, we can merge it but keep the issue open until I can test FreeBSD. |
oob := make([]byte, cmsglen) | ||
cmsg := (*syscall.Cmsghdr)(unsafe.Pointer(&oob[0])) | ||
cmsg.Level = syscall.IPPROTO_TCP | ||
cmsg.Type = msgTypeIPv4PKTINFO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you delete this constant? Note it’s defined a couple of times, for the different build architectures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is still being used here: https://github.com/lucas-clemente/quic-go/blob/master/conn_oob.go#L174. I will delete it with my next PR that uses the x
package also for reading OOB.
|
@marten-seemann CI LGTM. You okay if I squash commits? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Fixes #3275.
All Unit tests pass and existing unit tests in conn_oob_test.go already cover the use case addressed by this fix.