If for some reason SIOCAIFADDR fails, exit instead of hanging.
Without this diff I need to kill dhclient(8) with ctrl+C during boot
if I happen to have the address offered by the server configured on
a different interface.
WARNING: do not try to do that on -current without my rt_delete diffs
or your kernel with panic!
Ok?
Index: kroute.c
===================================================================
RCS file: /cvs/src/sbin/dhclient/kroute.c,v
retrieving revision 1.75
diff -u -p -r1.75 kroute.c
--- kroute.c 10 Feb 2015 04:20:26 -0000 1.75
+++ kroute.c 7 Dec 2015 15:51:17 -0000
@@ -473,7 +473,7 @@ priv_add_address(struct imsg_add_address
/* No need to set broadcast address. Kernel can figure it out. */
if (ioctl(s, SIOCAIFADDR, &ifaliasreq) == -1)
- warning("SIOCAIFADDR failed (%s): %s", inet_ntoa(imsg->addr),
+ error("SIOCAIFADDR failed (%s): %s", inet_ntoa(imsg->addr),
strerror(errno));
close(s);