summaryrefslogtreecommitdiff
path: root/sbin/dhclient
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2018-03-31 12:54:44 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2018-03-31 12:54:44 +0000
commita4a8c1159c51bb8157e365273278b4aef1dc0828 (patch)
tree01eb4968b93ea83ac2e51ff81bc9fe04a214f141 /sbin/dhclient
parent32891cb25b21332454ec43cc93317d285ca8802c (diff)
Fix '-i' to discard previously defined values for the options to be
ignored.
Diffstat (limited to 'sbin/dhclient')
-rw-r--r--sbin/dhclient/dhclient.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index aa2e6036308..807b2b5fd52 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dhclient.c,v 1.566 2018/03/20 11:46:32 krw Exp $ */
+/* $OpenBSD: dhclient.c,v 1.567 2018/03/31 12:54:43 krw Exp $ */
/*
* Copyright 2004 Henning Brauer <henning@openbsd.org>
@@ -2422,8 +2422,13 @@ apply_ignore_list(char *ignore_list)
list[ix++] = i;
}
- for (i = 0; i < ix; i++)
- config->default_actions[list[i]] = ACTION_IGNORE;
+ for (i = 0; i < ix; i++) {
+ j = list[i];
+ config->default_actions[j] = ACTION_IGNORE;
+ free(config->defaults[j].data);
+ config->defaults[j].data = NULL;
+ config->defaults[j].len = 0;
+ }
}
void