-
-
Notifications
You must be signed in to change notification settings - Fork 402
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 FreeBSD IP_RECVDSTADDR support #1447
Conversation
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.
Thanks! Any chance you could add a FreeBSD case to CI so this doesn't bitrot?
There's no FreeBSD runner image. So I try to use vmactions/freebsd-vm to run tests. |
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 for fixing up our FreeBSD support (and adding a CI test for it)!
I had a bit of a hard time reviewing this because it seems to have grown to encompass a bit more than just RECVDSTADDR
. If I understand correctly, there are few things here:
- Set
IPV6_RECVPKTINFO
on FreeBSD as well (not just on Linux) - Set
IP_RECVDSTADDR
on FreeBSD and macOS only for IPv4 - Fix a warning about unused
state: &UdpState
which we didn't notice before - Allow different types for the 3rd argument to
sendmmsg()
/recvmmsg()
It might be nice add some comments about how FreeBSD compares to Linux here, which is left implicit, for the reader to decode from the code. Additionally, IMO the expected spelling for encode_srcip
would be encode_src_ip
-- might be nice to fix that up.
…n FreeBSD & macOS, set IP_RECVDSTADDR on FreeBSD and macOS only for IPv4, fix a warning about unused state: &UdpState, allow different types for the 3rd argument to sendmmsg()/recvmmsg()
I added a few comments to clarify these parts related to FreeBSD and macOS, hope they be useful. And I have fixed the spelling😊 |
BTW, the easiest way to do CI on FreeBSD for Github-hosted projects is with https://cirrus-ci.com/ . |
I see you fix this bug in freebsd, but it still not work in openbsd, is there any possible help fix it in openbsd
|
Fixes #1142