summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2019-05-10 18:50:12 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2019-05-10 18:50:12 +0000
commit2895920134a1d117eb9f812f040e5435e679a6cb (patch)
tree9420fbe45d749c199180c9fc62a33b29d92a6b0b /sbin
parent2324951ac98d7862ac2a24c975ad79debdd0ba68 (diff)
Restart the protocol and get a new/renewed lease for any relevant
RTM_IFINFO seen. As dhclient no longer commits suicide to restart the protocol this should be very low cost. This will help some trunk(4) setups after some pending network stack commits. Requested by & ok florian@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index a5edff156ea..fe3ed74a1d5 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.633 2019/04/06 08:25:05 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.634 2019/05/10 18:50:11 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -342,7 +342,6 @@ rtm_dispatch(struct interface_info *ifi, struct rt_msghdr *rtm)
struct if_announcemsghdr *ifan;
struct ifa_msghdr *ifam;
struct if_ieee80211_data *ifie;
- int oldlinkup;
switch (rtm->rtm_type) {
case RTM_PROPOSAL:
@@ -376,12 +375,9 @@ rtm_dispatch(struct interface_info *ifi, struct rt_msghdr *rtm)
if ((rtm->rtm_flags & RTF_UP) == 0)
fatalx("down");
- oldlinkup = LINK_STATE_IS_UP(ifi->link_state);
interface_state(ifi);
- if (quit == 0) {
- if (LINK_STATE_IS_UP(ifi->link_state) != oldlinkup)
- quit = RESTART;
- }
+ if (quit == 0)
+ quit = RESTART;
break;
case RTM_80211INFO: