-
Notifications
You must be signed in to change notification settings - Fork 675
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 socket options for IP_TRANSPARENT / BIND_ANY #835
Conversation
76052a4
to
105b899
Compare
Thanks for the patch! You'll need to rebase to fix the conflict. After that, I'll merge it. |
105b899
to
37dea7b
Compare
Rebased, thanks! |
bors r+ |
835: Add socket options for IP_TRANSPARENT / BIND_ANY r=asomers a=justinlatimer Add socket options for implementing a transparent proxy. Sources: [Linux](https://www.kernel.org/doc/Documentation/networking/tproxy.txt) [OpenBSD](https://man.openbsd.org/setsockopt.2#SO_BINDANY) [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=ip&manpath=FreeBSD+11.1-RELEASE) Thanks!
Build failed |
bors retry |
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.
Once that's fixed LGTM
src/sys/socket/sockopt.rs
Outdated
@@ -179,6 +179,12 @@ sockopt_impl!(GetOnly, AcceptConn, libc::SOL_SOCKET, libc::SO_ACCEPTCONN, bool); | |||
#[cfg(any(target_os = "linux", target_os = "android"))] | |||
sockopt_impl!(GetOnly, OriginalDst, libc::SOL_IP, libc::SO_ORIGINAL_DST, libc::sockaddr_in); | |||
sockopt_impl!(Both, ReceiveTimestamp, libc::SOL_SOCKET, libc::SO_TIMESTAMP, bool); | |||
#[cfg(any(target_os = "linux", target_os = "android"))] |
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.
Targets should be listed alphabetically. Android should be before Linux on this line
37dea7b
to
c429517
Compare
c429517
to
92cac27
Compare
@Susurrus - targets reordered (did a bunch in the file to trigger travis rebuilds) - Thanks! |
Anything else I need to do on this one? |
Now we're just waiting on Travis CI to get it's Mac builders back under control before we can merge. |
Travis should be ok now. bors r+ |
835: Add socket options for IP_TRANSPARENT / BIND_ANY r=asomers a=justinlatimer Add socket options for implementing a transparent proxy. Sources: [Linux](https://www.kernel.org/doc/Documentation/networking/tproxy.txt) [OpenBSD](https://man.openbsd.org/setsockopt.2#SO_BINDANY) [FreeBSD](https://www.freebsd.org/cgi/man.cgi?query=ip&manpath=FreeBSD+11.1-RELEASE) Thanks!
Add socket options for implementing a transparent proxy.
Sources:
Linux
OpenBSD
FreeBSD
Thanks!