]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't abort if recv returns an error.
authorRoy Marples <roy@marples.name>
Tue, 1 May 2018 18:55:02 +0000 (19:55 +0100)
committerRoy Marples <roy@marples.name>
Tue, 1 May 2018 18:55:02 +0000 (19:55 +0100)
src/dhcp6.c
src/ipv6nd.c

index 6e470a988551e973d05e2f2a6fa99681f07d486a..37be20788ddf002a0bc1c28b2a1611860e402c66 100644 (file)
@@ -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;
index f059fb07bc377c6f3c32be998e78d96ecf4621a8..36a945d8738723ae4423a70f0b15a2f68e8c27ae 100644 (file)
@@ -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,