]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2509. [bug] Specifying a fixed query source port was broken.
authorMark Andrews <marka@isc.org>
Wed, 10 Dec 2008 07:03:50 +0000 (07:03 +0000)
committerMark Andrews <marka@isc.org>
Wed, 10 Dec 2008 07:03:50 +0000 (07:03 +0000)
                        [RT #19051]

CHANGES
lib/dns/dispatch.c

diff --git a/CHANGES b/CHANGES
index 3ce61c7c9db8c9d709f2c041a6f850d203ef13ee..f196182f9179e4199084b4303524bd3db244924e 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2509.  [bug]           Specifying a fixed query source port was broken.
+                       [RT #19051]
+
 2508.  [placeholder]
 
 2507.  [func]          Log the recursion quota values when killing the
index 4ab2f3eee02c366dfbce7d0d18482e17f8a13edd..a94f33d38235fcf9b58bc44f90b065359b7c6879 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: dispatch.c,v 1.155 2008/11/12 23:10:57 marka Exp $ */
+/* $Id: dispatch.c,v 1.156 2008/12/10 07:03:50 marka Exp $ */
 
 /*! \file */
 
@@ -2702,6 +2702,15 @@ get_udpsocket(dns_dispatchmgr_t *mgr, dns_dispatch_t *disp,
                 * If this fails 1024 times, we then ask the kernel for
                 * choosing one.
                 */
+       } else {
+               /* Allow to reuse address for non-random ports. */
+               result = open_socket(sockmgr, localaddr,
+                                    ISC_SOCKET_REUSEADDRESS, &sock);
+               if (result == ISC_R_SUCCESS)
+                       *sockp = sock;
+               return (result);
        }
 
        memset(held, 0, sizeof(held));