From: Roy Marples Date: Tue, 1 May 2018 18:55:02 +0000 (+0100) Subject: Don't abort if recv returns an error. X-Git-Tag: v7.0.4~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd1d84215cbc5b70f78838956660deb1c3fe9ba0;p=thirdparty%2Fdhcpcd.git Don't abort if recv returns an error. --- diff --git a/src/dhcp6.c b/src/dhcp6.c index 6e470a98..37be2078 100644 --- a/src/dhcp6.c +++ b/src/dhcp6.c @@ -3456,13 +3456,6 @@ dhcp6_recv(struct dhcpcd_ctx *ctx, struct ipv6_addr *ia) 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; diff --git a/src/ipv6nd.c b/src/ipv6nd.c index f059fb07..36a945d8 100644 --- a/src/ipv6nd.c +++ b/src/ipv6nd.c @@ -1529,9 +1529,6 @@ ipv6nd_handledata(void *arg) 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,