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

dnsdist: Use `IP_BIND_ADDRESS_NO_PORT` when available #4786

Merged
merged 1 commit into from Jan 19, 2017

Conversation

Projects
None yet
1 participant
@rgacogne
Member

rgacogne commented Dec 19, 2016

Short description

Since Linux 4.2, we can use IP_BIND_ADDRESS_NO_PORT to let the kernel know that we are calling bind() only to select the source address without any intention to listen on the socket. That way the source port "will be automatically chosen at connect() time, in a way that allows sharing a source port as long as the 4-tuples are unique."

Suggested by Willy Tarreau (thanks!).

Checklist

I have:

dnsdist: Use `IP_BIND_ADDRESS_NO_PORT` when available
Since Linux 4.2, we can use `IP_BIND_ADDRESS_NO_PORT` to let the kernel
know that we are calling `bind()` only to select the source address
without any intention to listen on the socket. That way the source
port "will be automatically chosen at `connect()` time, in a way
that allows sharing a source port as long as the 4-tuples are unique."

Suggested by Willy Tarreau (thanks!).

@rgacogne rgacogne added this to the dnsdist-1.2.0 milestone Dec 19, 2016

@rgacogne rgacogne merged commit 3ace195 into PowerDNS:master Jan 19, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rgacogne rgacogne deleted the rgacogne:dnsdist-bind-address-no-port branch Jan 19, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment