changeset 4267:b5284aa7f420 draft

Don't abort if recv returns an error.
author Roy Marples <roy@marples.name>
date Tue, 01 May 2018 19:55:02 +0100
parents bd15cb1af330
children bd01addbb40f
files src/dhcp6.c src/ipv6nd.c
diffstat 2 files changed, 0 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/dhcp6.c	Sun Apr 29 21:38:58 2018 +0100
+++ b/src/dhcp6.c	Tue May 01 19:55:02 2018 +0100
@@ -3456,13 +3456,6 @@
 	bytes = recvmsg_realloc(s, &ctx->rcvhdr, 0);
 	if (bytes == -1) {
 		logerr("%s: recvmsg_realloc", __func__);
-		close(s);
-		eloop_event_delete(ctx->eloop, s);
-		if (ia != NULL)
-			ia->dhcp6_fd = -1;
-		else
-			ctx->dhcp6_fd = -1;
-		eloop_exit(ctx->eloop, 1);
 		return;
 	}
 	len = (size_t)bytes;
--- a/src/ipv6nd.c	Sun Apr 29 21:38:58 2018 +0100
+++ b/src/ipv6nd.c	Tue May 01 19:55:02 2018 +0100
@@ -1529,9 +1529,6 @@
 	len = recvmsg_realloc(ctx->nd_fd, &ctx->rcvhdr, 0);
 	if (len == -1) {
 		logerr(__func__);
-		eloop_event_delete(ctx->eloop, ctx->nd_fd);
-		close(ctx->nd_fd);
-		ctx->nd_fd = -1;
 		return;
 	}
 	ctx->sfrom = inet_ntop(AF_INET6, &ctx->from.sin6_addr,