Don't force use
to disabled
if usev4
or usev6
is enabled
Now that the default changes depending on `usev4` and `usev6`, this is no longer necessary. Removing it simplifies the code a bit and makes the behavior of unit tests match the overall behavior a bit better.
This commit is contained in:
parent
f024bcce34
commit
acd8dfe47f
1 changed files with 1 additions and 5 deletions
|
@ -1143,7 +1143,7 @@ my @opt = (
|
||||||
["cache", "=s", "--cache=<path> : record address used in <path>"],
|
["cache", "=s", "--cache=<path> : record address used in <path>"],
|
||||||
["pid", "=s", "--pid=<path> : record process id in <path> if daemonized"],
|
["pid", "=s", "--pid=<path> : record process id in <path> if daemonized"],
|
||||||
"",
|
"",
|
||||||
["use", "=s", "--use=<which> : deprecated, see '--usev4' and '--usev6' (forced to 'disabled' if either '--usev4' or '--usev6' is enabled)"],
|
["use", "=s", "--use=<which> : deprecated, see '--usev4' and '--usev6'"],
|
||||||
&ip_strategies_usage(),
|
&ip_strategies_usage(),
|
||||||
["usev4", "=s", "--usev4=<which> : how the IPv4 address should be obtained"],
|
["usev4", "=s", "--usev4=<which> : how the IPv4 address should be obtained"],
|
||||||
&ipv4_strategies_usage(),
|
&ipv4_strategies_usage(),
|
||||||
|
@ -1925,10 +1925,6 @@ sub init_config {
|
||||||
# TODO: Why aren't the hosts specified by --host added to %config except when --options is also
|
# TODO: Why aren't the hosts specified by --host added to %config except when --options is also
|
||||||
# given?
|
# given?
|
||||||
|
|
||||||
for my $h (keys %config) {
|
|
||||||
$config{$h}{use} = 'disabled'
|
|
||||||
if opt('usev4', $h) ne 'disabled' || opt('usev6', $h) ne 'disabled';
|
|
||||||
}
|
|
||||||
my @protos = map(opt('protocol', $_), keys(%config));
|
my @protos = map(opt('protocol', $_), keys(%config));
|
||||||
my @needs_sha1 = grep({ my $p = $_; grep($_ eq $p, @protos); } qw(freedns nfsn));
|
my @needs_sha1 = grep({ my $p = $_; grep($_ eq $p, @protos); } qw(freedns nfsn));
|
||||||
load_sha1_support(join(', ', @needs_sha1)) if @needs_sha1;
|
load_sha1_support(join(', ', @needs_sha1)) if @needs_sha1;
|
||||||
|
|
Loading…
Reference in a new issue