Normalize inconsistent -noexternalip behavior

Treat specifying -noexternalip the same as not specifying -externalip, instead
of causing it to soft-set the -discover default to false.

Before this change, was -noexternalip basically an undocumented synonym for
-nodiscover.

After this change, specifying -noexternalip just clears previously specifed
-externalip options, restoring default behavior as if they were not were
specified.

The previous -noexternalip behavior wasn't neccessarily bad, but it was
undocumented, redundant with the -nodiscover option, and inconsistent with
behavior of other list options.
This commit is contained in:
Ryan Ofsky 2019-12-19 18:00:04 -05:00
parent ecd590d4c1
commit 3d1e8ca53a

View File

@ -762,7 +762,7 @@ void InitParameterInteraction(ArgsManager& args)
}
}
if (args.IsArgSet("-externalip")) {
if (!args.GetArgs("-externalip").empty()) {
// if an explicit public IP is specified, do not try to find others
if (args.SoftSetBoolArg("-discover", false))
LogInfo("parameter interaction: -externalip set -> setting -discover=0\n");