summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2018-05-01 19:55:02 +0100
committerRoy Marples <roy@marples.name>2018-05-01 19:55:02 +0100
commitbd1d84215cbc5b70f78838956660deb1c3fe9ba0 (patch)
tree2b6845b506edadf366fd2920de3693fcdf2258d1
parent32945b618c1456aa23755d0a540495309dcfc41c (diff)
downloaddhcpcd-bd1d84215cbc5b70f78838956660deb1c3fe9ba0.tar.xz
Don't abort if recv returns an error.
-rw-r--r--src/dhcp6.c7
-rw-r--r--src/ipv6nd.c3
2 files changed, 0 insertions, 10 deletions
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,