diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-12-03 22:36:17 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2012-12-03 22:36:17 +0000 |
commit | 351d7a7c8f7fe76323d05f7456a41536052339e0 (patch) | |
tree | d94c160bd1ae122fdbb9100f5378640863dc6a38 /sbin/dhclient | |
parent | 5aaf6420dfa80d7c60e4db3b822d91219cc711f1 (diff) |
Backout last. It breaks existing 'ifconfig down ; dhclient' usage.
Pointed out by deraadt@
Diffstat (limited to 'sbin/dhclient')
-rw-r--r-- | sbin/dhclient/dhclient.c | 7 | ||||
-rw-r--r-- | sbin/dhclient/kroute.c | 6 |
2 files changed, 5 insertions, 8 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index d44be7867fa..1766d2d696d 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.186 2012/12/03 22:19:47 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.187 2012/12/03 22:36:16 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -229,9 +229,8 @@ routehandler(void) if (ifm->ifm_index != ifi->index) break; if ((rtm->rtm_flags & RTF_UP) == 0) { - ifi->linkstat = 0; - cleanup(client->active); - return; + errmsg = "interface down"; + goto die; } linkstat = diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index 53c0d0a7b5b..7290fb7e927 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.21 2012/12/03 22:19:47 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.22 2012/12/03 22:36:16 krw Exp $ */ /* * Copyright 2012 Kenneth R Westerback <krw@openbsd.org> @@ -624,14 +624,12 @@ 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) - delete_address(ifi->name, ifi->rdomain, active->address); + imsg.addr = active->address; rslt = imsg_compose(unpriv_ibuf, IMSG_CLEANUP, 0, 0, -1, &imsg, sizeof(imsg)); |