summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/dhclient/dhclient.c6
-rw-r--r--sbin/dhclient/dispatch.c13
2 files changed, 9 insertions, 10 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 1ebbcb66077..2d08f2f0dde 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.397 2017/02/12 15:53:15 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.398 2017/02/14 22:46:53 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -422,7 +422,7 @@ done:
die:
if (rslt == -1)
fatalx("no memory for errmsg");
- fatalx("%s; exiting", errmsg);
+ fatalx("%s", errmsg);
}
char **saved_argv;
@@ -2259,7 +2259,7 @@ fork_privchld(struct interface_info *ifi, int fd, int fd2)
}
if (quit != INTERNALSIG)
- log_warnx("%s; exiting", strsignal(quit));
+ fatalx("%s", strsignal(quit));
exit(1);
}
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
index 9c47b7bb8e7..b903cb4fd9a 100644
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dispatch.c,v 1.115 2017/02/12 15:53:15 krw Exp $ */
+/* $OpenBSD: dispatch.c,v 1.116 2017/02/14 22:46:53 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -193,8 +193,7 @@ dispatch(struct interface_info *ifi)
log_warnx("%s; restarting", strsignal(quit));
exit (0);
} else if (quit != INTERNALSIG) {
- log_warnx("%s; exiting", strsignal(quit));
- exit(1);
+ fatalx("%s", strsignal(quit));
}
}
@@ -207,12 +206,12 @@ packethandler(struct interface_info *ifi)
ssize_t result;
if ((result = receive_packet(ifi, &from, &hfrom)) == -1) {
- log_warn("%s receive_packet failed", ifi->name);
ifi->errors++;
- if (ifi->errors > 20) {
- fatalx("%s too many receive_packet failures; exiting",
+ if (ifi->errors > 20)
+ fatalx("%s too many receive_packet failures",
ifi->name);
- }
+ else
+ log_warn("%s receive_packet failed", ifi->name);
return;
}
ifi->errors = 0;