From: Roy Marples Date: Fri, 2 May 2014 20:57:21 +0000 (+0000) Subject: Log any errors sending the interface afer a getinterfaces call. X-Git-Tag: v6.4.0~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=94cb985a8e37779af588a3c70b64b91a3b391547;p=thirdparty%2Fdhcpcd.git Log any errors sending the interface afer a getinterfaces call. --- diff --git a/dhcpcd.c b/dhcpcd.c index 2927dfc0..f9cb85da 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -998,7 +998,10 @@ dhcpcd_handleargs(struct dhcpcd_ctx *ctx, struct fd_list *fd, sizeof(len))) return -1; TAILQ_FOREACH(ifp, ctx->ifaces, next) { - send_interface(fd->fd, ifp); + if (send_interface(fd->fd, ifp) == -1) + syslog(LOG_ERR, + "send_interface %d: %m", + fd->fd); } return 0; } @@ -1019,8 +1022,11 @@ dhcpcd_handleargs(struct dhcpcd_ctx *ctx, struct fd_list *fd, opt = 0; while (argv[++opt] != NULL) { TAILQ_FOREACH(ifp, ctx->ifaces, next) { - if (strcmp(argv[opt], ifp->name) == 0) - send_interface(fd->fd, ifp); + if (strcmp(argv[opt], ifp->name)== 0 && + send_interface(fd->fd, ifp) == -1) + syslog(LOG_ERR, + "send_interface %d: %m", + fd->fd); } } return 0;