diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-09-29 15:29:07 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2016-09-29 15:29:07 +0000 |
commit | 306990277bb27ecda1d717d26ecf6c23dd7d9dd5 (patch) | |
tree | b6e78ddea4488c3e91b5f835dff63db37f354a19 /sbin/dhclient/dhclient.c | |
parent | 1eb8b34127963995779ef307282028ab40213f41 (diff) |
Don't record non-existant client identifier in lease file.
Diffstat (limited to 'sbin/dhclient/dhclient.c')
-rw-r--r-- | sbin/dhclient/dhclient.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index a4ada938333..692643c8754 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.390 2016/09/27 15:17:58 jca Exp $ */ +/* $OpenBSD: dhclient.c,v 1.391 2016/09/29 15:29:06 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -2007,9 +2007,10 @@ lease_as_string(struct interface_info *ifi, char *type, if (i == DHO_DHCP_CLIENT_IDENTIFIER) { /* Ignore any CLIENT_IDENTIFIER from server. */ opt = &config->send_options[i]; - } else if (lease->options[i].len) + } else opt = &lease->options[i]; - else + + if (opt->len == 0) continue; rslt = snprintf(p, sz, " option %s %s;\n", |