diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-01-26 18:51:43 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2013-01-26 18:51:43 +0000 |
commit | a8686a4db10a5de9ae2298c5156d0554b991776e (patch) | |
tree | 9af3f8e2dc681e261f578f3b5d1fc884ec42d36d | |
parent | 26a1494c9f336572dc0f7a7af7528187c5ac1e58 (diff) |
Oops. Restore "no domain-name, no domain-name-seervers means don't
touch resolv.conf" behaviour.
-rw-r--r-- | sbin/dhclient/dhclient.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 52409f59a44..e8dd7814e13 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.215 2013/01/26 05:07:21 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.216 2013/01/26 18:51:42 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -1925,6 +1925,10 @@ new_resolv_conf(char *ifname, char *domainname, char *nameservers, strlcat(imsg.contents, "\n", MAXRESOLVCONFSIZE); } + /* Don't touch resolv.conf if no domainname and no nameservers. */ + if (strlen(imsg.contents) == 0) + return; + strlcat(imsg.contents, resolv_tail, MAXRESOLVCONFSIZE); rslt = imsg_compose(unpriv_ibuf, IMSG_NEW_RESOLV_CONF, 0, 0, -1, &imsg, |