mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-12-05 22:18:35 +00:00
6aee2a45f870c1ba3df829decde359ff01f01922
Connecting an unbound UDP socket implicitly assigns a local address and
port. A subsequent bind() fails with EINVAL when min-port, max-port or
an explicit source address requires local_bind() to bind the socket.
Bind the local socket and set the outgoing interface before connecting
to the upstream server. Preserve the existing error reporting.
Fixes: cc32bce779 ("connect() UDP sockets to upstream DNS servers to mitigate SAD DNS attack.")
Languages
C
94.3%
Perl
2.2%
HTML
1.2%
Shell
1%
Makefile
0.6%
Other
0.6%