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
base: 4.1
from

Conversation

Projects
None yet
2 participants
@albertok
Contributor

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

albertok added some commits Jul 30, 2017

Allows IP_TRANSPARENT to be set on a redirecting socket
 
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

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Jul 30, 2017

Member

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

Member

normanmaurer commented Jul 30, 2017

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

@normanmaurer normanmaurer self-assigned this Jul 30, 2017

@normanmaurer

This comment has been minimized.

Show comment
Hide comment
@normanmaurer

normanmaurer Jul 30, 2017

Member

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

@albertok thanks

Member

normanmaurer commented Jul 30, 2017

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