dnsdist: Prevent dangling TCP fd in case setupTCPDownstream() fails #3634

Merged
merged 1 commit into from Apr 1, 2016

Projects

None yet

1 participant

@rgacogne
Member

Remove the closed socket descriptor from the sockets map.
Otherwise, if an exception occurs in setupTCPDownstream(), we might
try to use it and close it again later, not knowing it has been
reassigned to another socket or, worse, to a TCP acceptor pipe.
This might fix #3560.

@rgacogne rgacogne dnsdist: Prevent dangling TCP fd in case setupTCPDownstream() fails
Remove the closed socket descriptor from the sockets map.
Otherwise, if an exception occurs in setupTCPDownstream(), we might
try to use it and close it again later, not knowing it has been
reassigned to another socket or, worse, to a TCP acceptor pipe.
65d7f2b
@rgacogne rgacogne merged commit 13506cd into PowerDNS:master Apr 1, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rgacogne rgacogne deleted the rgacogne:dnsdist-dangling-tcp-fd branch Apr 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment