]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Log any errors sending the interface afer a getinterfaces call.
authorRoy Marples <roy@marples.name>
Fri, 2 May 2014 20:57:21 +0000 (20:57 +0000)
committerRoy Marples <roy@marples.name>
Fri, 2 May 2014 20:57:21 +0000 (20:57 +0000)
dhcpcd.c

index 2927dfc08f1a0ea919f7bef13009ac97222aa501..f9cb85dae99204645671d98dda88ed5a99701ef0 100644 (file)
--- 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;