]> granicus.if.org Git - pdns/commit
dnsdist: Prevent dangling TCP fd in case setupTCPDownstream() fails
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 29 Mar 2016 12:49:50 +0000 (14:49 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 29 Mar 2016 12:49:50 +0000 (14:49 +0200)
commit65d7f2bbef55df87077bc7794f9d479e3d460ab1
tree7936468a84c67c663491023b59b5aeeec5d6d382
parentd1f94072b1240464cb59f13f48b8a1c97ec43b88
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.
pdns/dnsdist-tcp.cc