summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/dhclient.c7
-rw-r--r--sbin/dhclient/kroute.c6
2 files changed, 8 insertions, 5 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index 94729e622ac..d44be7867fa 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.185 2012/12/02 17:03:19 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.186 2012/12/03 22:19:47 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -229,8 +229,9 @@ routehandler(void)
if (ifm->ifm_index != ifi->index)
break;
if ((rtm->rtm_flags & RTF_UP) == 0) {
- errmsg = "interface down";
- goto die;
+ ifi->linkstat = 0;
+ cleanup(client->active);
+ return;
}
linkstat =
diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c
index 8665ad44ee7..53c0d0a7b5b 100644
--- a/sbin/dhclient/kroute.c
+++ b/sbin/dhclient/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.20 2012/12/02 17:03:19 krw Exp $ */
+/* $OpenBSD: kroute.c,v 1.21 2012/12/03 22:19:47 krw Exp $ */
/*
* Copyright 2012 Kenneth R Westerback <krw@openbsd.org>
@@ -624,12 +624,14 @@ cleanup(struct client_lease *active)
struct imsg_cleanup imsg;
int rslt;
+ cancel_timeout();
+
memset(&imsg, 0, sizeof(imsg));
strlcpy(imsg.ifname, ifi->name, sizeof(imsg.ifname));
imsg.rdomain = ifi->rdomain;
if (active)
- imsg.addr = active->address;
+ delete_address(ifi->name, ifi->rdomain, active->address);
rslt = imsg_compose(unpriv_ibuf, IMSG_CLEANUP, 0, 0, -1,
&imsg, sizeof(imsg));