]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
fix a bug related to 0 byte UDP packets
authorMichael Graff <mgraff@isc.org>
Wed, 10 Sep 2008 22:49:47 +0000 (22:49 +0000)
committerMichael Graff <mgraff@isc.org>
Wed, 10 Sep 2008 22:49:47 +0000 (22:49 +0000)
lib/isc/win32/socket.c

index 24dbd973c0fe3b6fda398640d5f7c68a0db12b5d..320c85c054f9795da4455dd039ff8f57d763434a 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: socket.c,v 1.5.2.13.2.24.4.6.4.2 2008/09/04 16:42:46 each Exp $ */
+/* $Id: socket.c,v 1.5.2.13.2.24.4.6.4.3 2008/09/10 22:49:47 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;