2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 22:15:20 +00:00

make unreachable errors on unconnected UDP sockets be soft errors, rather than hard ones.

This commit is contained in:
Michael Graff
2000-09-06 22:55:33 +00:00
parent 60499e68cb
commit e558faa60b

View File

@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: socket.c,v 1.163 2000/08/31 17:10:58 gson Exp $ */
/* $Id: socket.c,v 1.164 2000/09/06 22:55:33 explorer Exp $ */
#include <config.h>
@@ -849,8 +849,8 @@ doio_recv(isc_socket_t *sock, isc_socketevent_t *dev) {
}
SOFT_OR_HARD(ECONNREFUSED, ISC_R_CONNREFUSED);
ALWAYS_HARD(ENETUNREACH, ISC_R_NETUNREACH);
ALWAYS_HARD(EHOSTUNREACH, ISC_R_HOSTUNREACH);
SOFT_OR_HARD(ENETUNREACH, ISC_R_NETUNREACH);
SOFT_OR_HARD(EHOSTUNREACH, ISC_R_HOSTUNREACH);
ALWAYS_HARD(ENOBUFS, ISC_R_NORESOURCES);
#undef SOFT_OR_HARD
@@ -2833,6 +2833,9 @@ isc_socket_connect(isc_socket_t *sock, isc_sockaddr_t *addr,
case ENETUNREACH:
dev->result = ISC_R_NETUNREACH;
goto err_exit;
case EHOSTUNREACH:
dev->result = ISC_R_HOSTUNREACH;
goto err_exit;
}
sock->connected = 0;