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

Allow IP_TRANSPARENT to be set on redirecting socket #7037

Closed
wants to merge 2 commits into from

Conversation

albertok
Copy link
Contributor

@albertok albertok commented Jul 30, 2017

Motivation:

TProxy support is not complete, the IP_TRANSPARENT option can currently only be set on EpollServerSocket. Setting the option on an EpollSocket is also required so as to be able to bind a socket to a non-local address as described in ip(7)
http://man7.org/linux/man-pages/man7/ip.7.html

"TProxy redirection with the iptables TPROXY target also
requires that this option be set on the redirected socket."

Modifications:

Added IP_TRANSPARENT socket option to EpollSocketChannelConfig

Result:

A redirecting socket can be created with a non-local IP address as required for TProxy

 
Motivation:

IP_TRANSPARENT support is not complete, the option can currently only be set on EpollServerSocket. Setting the option on an EpollSocket is also requires so as to be able to bind a socket to a non-local address as described in ip(7)
http://man7.org/linux/man-pages/man7/ip.7.html

"TProxy redirection with the iptables TPROXY target also
requires that this option be set on the redirected socket."
 
Modifications:

Added IP_TRANSPARENT socket option to EpollSocketChannelConfig
 
Result:

A redirecting socket can be created with a non-local IP address as required for TPROXY
@normanmaurer
Copy link
Member

@albertok LGTM... let me squash and merge once the ci finish.

@normanmaurer normanmaurer self-assigned this Jul 30, 2017
@normanmaurer
Copy link
Member

Squashed and cherry-picked into 4.1 (21b7ab1) and 4.0 (de6a18e)

@albertok thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants