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 socket options for IP_TRANSPARENT / BIND_ANY #835

Merged
merged 1 commit into from
Jan 26, 2018

Conversation

justinlatimer
Copy link
Contributor

Add socket options for implementing a transparent proxy.
Sources:
Linux
OpenBSD
FreeBSD

Thanks!

@asomers
Copy link
Member

asomers commented Jan 11, 2018

Thanks for the patch! You'll need to rebase to fix the conflict. After that, I'll merge it.

@justinlatimer
Copy link
Contributor Author

Rebased, thanks!

@asomers
Copy link
Member

asomers commented Jan 11, 2018

bors r+

bors bot added a commit that referenced this pull request Jan 11, 2018
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!
@bors
Copy link
Contributor

bors bot commented Jan 11, 2018

Build failed

@justinlatimer
Copy link
Contributor Author

bors retry

Copy link
Contributor

@Susurrus Susurrus left a 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

@@ -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"))]
Copy link
Contributor

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

@justinlatimer
Copy link
Contributor Author

@Susurrus - targets reordered (did a bunch in the file to trigger travis rebuilds) - Thanks!

@justinlatimer
Copy link
Contributor Author

Anything else I need to do on this one?

@Susurrus
Copy link
Contributor

Now we're just waiting on Travis CI to get it's Mac builders back under control before we can merge.

@asomers
Copy link
Member

asomers commented Jan 26, 2018

Travis should be ok now.

bors r+

bors bot added a commit that referenced this pull request Jan 26, 2018
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!
@bors
Copy link
Contributor

bors bot commented Jan 26, 2018

@bors bors bot merged commit 92cac27 into nix-rust:master Jan 26, 2018
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

3 participants