mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 05:57:52 +00:00
2846. [bug] EOF on unix domain sockets was not being handled
correctly. [RT #20731]
This commit is contained in:
parent
834a31a021
commit
ebaf977ecf
3
CHANGES
3
CHANGES
@ -1,3 +1,6 @@
|
|||||||
|
2846. [bug] EOF on unix domain sockets was not being handled
|
||||||
|
correctly. [RT #20731]
|
||||||
|
|
||||||
2845. [bug] RFC 5011 client could crash on shutdown. [RT #20903]
|
2845. [bug] RFC 5011 client could crash on shutdown. [RT #20903]
|
||||||
|
|
||||||
2844. [doc] notify-delay default in ARM was wrong. It should have
|
2844. [doc] notify-delay default in ARM was wrong. It should have
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: socket.c,v 1.326 2009/11/13 00:41:58 each Exp $ */
|
/* $Id: socket.c,v 1.327 2010/01/31 23:18:03 marka Exp $ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@ -1674,12 +1674,22 @@ doio_recv(isc__socket_t *sock, isc_socketevent_t *dev) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* On TCP, zero length reads indicate EOF, while on
|
* On TCP and UNIX sockets, zero length reads indicate EOF,
|
||||||
* UDP, zero length reads are perfectly valid, although
|
* while on UDP sockets, zero length reads are perfectly valid,
|
||||||
* strange.
|
* although strange.
|
||||||
*/
|
*/
|
||||||
if ((sock->type == isc_sockettype_tcp) && (cc == 0))
|
switch (sock->type) {
|
||||||
return (DOIO_EOF);
|
case isc_sockettype_tcp:
|
||||||
|
case isc_sockettype_unix:
|
||||||
|
if (cc == 0)
|
||||||
|
return (DOIO_EOF);
|
||||||
|
break;
|
||||||
|
case isc_sockettype_udp:
|
||||||
|
break;
|
||||||
|
case isc_sockettype_fdwatch:
|
||||||
|
default:
|
||||||
|
INSIST(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (sock->type == isc_sockettype_udp) {
|
if (sock->type == isc_sockettype_udp) {
|
||||||
dev->address.length = msghdr.msg_namelen;
|
dev->address.length = msghdr.msg_namelen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user