summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2019-05-10 18:50:11 +0000
committerkrw <krw@openbsd.org>2019-05-10 18:50:11 +0000
commita571f6fc23a13c4832f0066f64a7d855785533f4 (patch)
tree78d54f1172850b5528fdfcd0aced3161452e60fa
parentRevert part of r1.36: in the case of GCM, gcm.key is assigned from (diff)
downloadwireguard-openbsd-a571f6fc23a13c4832f0066f64a7d855785533f4.tar.xz
wireguard-openbsd-a571f6fc23a13c4832f0066f64a7d855785533f4.zip
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@
-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: