From: Michael Graff Date: Wed, 10 Sep 2008 21:37:15 +0000 (+0000) Subject: fix a bug related to 0 byte UDP packets X-Git-Tag: v9.4.2-P2-W2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bcb28fb999c28dda186ff9564722b1bb514347a5;p=thirdparty%2Fbind9.git fix a bug related to 0 byte UDP packets --- diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c index cb7022f8a59..682bd35b5a2 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.30.18.20.12.5.6.2 2008/09/04 05:47:09 each Exp $ */ +/* $Id: socket.c,v 1.30.18.20.12.5.6.3 2008/09/10 21:37:15 explorer Exp $ */ /* This code uses functions which are only available on Server 2003 and * higher, and Windows XP and higher. @@ -2166,7 +2166,7 @@ internal_recv(isc_socket_t *sock, int nbytes) * We do check for a recv() of 0 bytes on a TCP stream. This means the remote end * has closed. */ - if (nbytes == 0) { + if (nbytes == 0 && sock->type == isc_sockettype_tcp) { send_recvdone_abort(sock, ISC_R_EOF); maybe_free_socket(&sock, __LINE__); return;