From 8859bf7718536df00f28bbe4813be7a491a78b25 Mon Sep 17 00:00:00 2001 From: krw Date: Mon, 12 May 2014 13:12:41 +0000 Subject: [PATCH] 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.. --- sbin/dhclient/clparse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.20.1