From: krw Date: Mon, 12 May 2014 13:12:41 +0000 (+0000) Subject: Since all static leases are in one file, /etc/dhclient.conf, there is no X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8859bf7718536df00f28bbe4813be7a491a78b25;p=openbsd Since all static leases are in one file, /etc/dhclient.conf, there is no 'wrong interface' specification. So display that error message only for non-static leases. i.e. when reading /var/db/dhclient.leases.. --- diff --git a/sbin/dhclient/clparse.c b/sbin/dhclient/clparse.c index ebbda2c0c25..b5f06fb5401 100644 --- a/sbin/dhclient/clparse.c +++ b/sbin/dhclient/clparse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clparse.c,v 1.86 2014/05/11 12:40:37 krw Exp $ */ +/* $OpenBSD: clparse.c,v 1.87 2014/05/12 13:12:41 krw Exp $ */ /* Parser for dhclient config and lease files. */ @@ -536,7 +536,8 @@ parse_client_lease_declaration(FILE *cfile, struct client_lease *lease) return; } if (strcmp(ifi->name, val) != 0) { - parse_warn("wrong interface name."); + if (lease->is_static == 0) + parse_warn("wrong interface name."); skip_to_semi(cfile); return; }