diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2018-03-31 12:54:44 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2018-03-31 12:54:44 +0000 |
commit | a4a8c1159c51bb8157e365273278b4aef1dc0828 (patch) | |
tree | 01eb4968b93ea83ac2e51ff81bc9fe04a214f141 /sbin/dhclient | |
parent | 32891cb25b21332454ec43cc93317d285ca8802c (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.c | 11 |
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 |