-
Notifications
You must be signed in to change notification settings - Fork 670
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 support for RecvOrigDstAddr on Linux #1772
Conversation
Still trying to work out why this doesn't work. But is a start. Also not sure if I should use |
9471997
to
c00d930
Compare
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.
These new symbols are also defined for Android and FreeBSD. You should enable them there.
@asomers Will do so, thanks. I am not actually sure what these functions are suppose to be returning for non-TPROXY connections. Seem to be getting random addresses, which is causing the tests to fail. Not sure if that is normal or not. Setting up TPROXY firewall rules probably an overkill for these tests. |
c00d930
to
e504662
Compare
Also for some reason this works: let mut space = cmsg_space!(libc::in_addr, [u8; 0]); But this fails with let mut space = cmsg_space!(libc::in_addr); I have no idea what is going on here. |
I am also a bit puzzled in that some Linux platforms don't appear to be running the |
That's because |
e504662
to
3aed58e
Compare
OK, fixed that, was confused reading an existing test. Trying to run a local test with TPROXY, but first need to debug why my TPROXY UDP firewall rules don't appear to be working... |
3aed58e
to
bb5b474
Compare
All tests pass now when run locally.... |
bb5b474
to
e38c034
Compare
Some of the Linux targets are failing tests. Wonder if this is a Linux compile time option. |
Confirmed it works with a really hackish TPROXY UDP client now. Looks like values need network byte ordering conversion, was expecting that. |
The |
e38c034
to
545528e
Compare
Done. |
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.
Mostly looks good, but for the naming. And don't forget to add a CHANGELOG entry.
545528e
to
09f1123
Compare
Added changelog entry. |
09f1123
to
c45cd74
Compare
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.
bors r+
BTW, I just added IPV6_ORIGDSTADDR to the ip6(4) man page on FreeBSD. |
Fixes #1767