]> 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 21:37:15 +0000 (21:37 +0000)
committerMichael Graff <mgraff@isc.org>
Wed, 10 Sep 2008 21:37:15 +0000 (21:37 +0000)
lib/isc/win32/socket.c

index cb7022f8a59e629cae7c74771ad31773e16bd792..682bd35b5a2cb3cac787b1dd43b2c4a93553c853 100644 (file)
@@ -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;