dnsproxy: Close the UDP socket on error condition.
authorForest Bond <forest.bond@rapidrollout.com>
Thu, 15 Nov 2012 15:23:50 +0000 (10:23 -0500)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 16 Nov 2012 12:59:05 +0000 (14:59 +0200)
commita3c241e74ce36b53e8105c76971eec9acc5cba74
tree871090ee4b3e28b6e1a414eaa27cbb3b502bfa66
parentb265aa0b0c187cc660f3b3e1714d383132821c38
dnsproxy: Close the UDP socket on error condition.

The socket is created again on the next request.

Previously, an error condition only caused the event watch to be removed
and then added again on the next request to avoid processing spurious
error events.  But in some network environments, the error condition is
caused by an overly aggressive firewall that rejects our UDP packets and
sends an ICMP error packet indicating an unreachable host and/or port.
In some of these cases we can recover by using a different UDP source
port for outgoing requests (i.e. by closing and re-opening the socket).
src/dnsproxy.c