From: Mark Andrews Date: Fri, 18 Jun 2004 01:14:59 +0000 (+0000) Subject: 1660. [bug] win32: connection_reset_fix() was being called X-Git-Tag: v9.2.4rc6~9^2~29 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=99ba7fc5ff50823248155f4f2954ece0271b4354;p=thirdparty%2Fbind9.git 1660. [bug] win32: connection_reset_fix() was being called unconditionally. [RT #11595] --- diff --git a/CHANGES b/CHANGES index 6eee8048bf5..8b803e7effe 100644 --- a/CHANGES +++ b/CHANGES @@ -11,7 +11,8 @@ 1661. [placeholder] rt11582 -1660 [placeholder] rt11595 +1660. [bug] win32: connection_reset_fix() was being called + unconditionally. [RT #11595] 1659. [cleanup] Cleanup some messages that were referring to KEY vs DNSKEY, NXT vs NSEC and SIG vs RRSIG. diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index f37e7b5d412..5d2e8d976dd 100644 --- a/lib/isc/win32/socket.c +++ b/lib/isc/win32/socket.c @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: socket.c,v 1.32 2004/05/17 03:15:59 marka Exp $ */ +/* $Id: socket.c,v 1.33 2004/06/18 01:14:59 marka Exp $ */ /* This code has been rewritten to take advantage of Windows Sockets * I/O Completion Ports and Events. I/O Completion Ports is ONLY @@ -1846,11 +1846,13 @@ isc_socket_create(isc_socketmgr_t *manager, int pf, isc_sockettype_t type, switch (type) { case isc_sockettype_udp: sock->fd = socket(pf, SOCK_DGRAM, IPPROTO_UDP); - result = connection_reset_fix(sock->fd); - if (result != ISC_R_SUCCESS) { - closesocket(sock->fd); - free_socket(&sock); - return (result); + if (sock->fd != INVALID_SOCKET) { + result = connection_reset_fix(sock->fd); + if (result != ISC_R_SUCCESS) { + closesocket(sock->fd); + free_socket(&sock); + return (result); + } } break; case isc_sockettype_tcp: