Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 482997498f9f95c2819169698d08f0c7 > files > 46

bind-9.3.6-25.P1.el5_11.8.src.rpm

diff -up bind-9.6.0rc1/lib/dns/dispatch.c.rh475120 bind-9.6.0rc1/lib/dns/dispatch.c
--- bind-9.6.0rc1/lib/dns/dispatch.c.rh475120	2008-11-13 00:10:57.000000000 +0100
+++ bind-9.6.0rc1/lib/dns/dispatch.c	2008-12-09 15:06:18.000000000 +0100
@@ -2702,6 +2702,15 @@ get_udpsocket(dns_dispatchmgr_t *mgr, dn
 		 * 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));