summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2019-11-06 12:14:20 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2019-11-06 12:14:20 +0000
commit5978e76af4ec6f6a82e111b58ad8d40a6dd78353 (patch)
tree44aa12c598f4258527ef9e2db71c35667c78ff18 /sbin
parentd66e7980442bd55ff308630b890c78a3f71632d1 (diff)
No need to write resolv.conf after deciding to get a new lease,
or after deciding to terminate or when AUTOCONF4 is not set.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhclient/dhclient.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index c5d197ee274..a2cff25f53f 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.651 2019/08/06 11:07:36 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.652 2019/11/06 12:14:19 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -431,10 +431,11 @@ rtm_dispatch(struct interface_info *ifi, struct rt_msghdr *rtm)
}
/*
- * Something has happened that may have granted/revoked responsibility
- * for resolv.conf.
+ * Responsibility for resolv.conf may have changed hands.
*/
- if (ifi->active != NULL && (ifi->flags & IFI_IN_CHARGE) != 0)
+ if (quit == 0 && ifi->active != NULL &&
+ (ifi->flags & IFI_AUTOCONF) != 0 &&
+ (ifi->flags & IFI_IN_CHARGE) != 0)
write_resolv_conf();
}