Prevent the use of -disableipv4/-disableipv6 multiple times
This commit is contained in:
@@ -1134,6 +1134,14 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
LogPrintf("%s: parameter interaction: -externalip set -> setting -discover=0\n", __func__);
|
||||
}
|
||||
|
||||
if(mapMultiArgs["-disableipv6"].size() > 1) {
|
||||
return InitError("-disableipv6 can only be used once");
|
||||
}
|
||||
|
||||
if(mapMultiArgs["-disableipv4"].size() > 1) {
|
||||
return InitError("-disableipv4 can only be used once");
|
||||
}
|
||||
|
||||
if (GetBoolArg("-disableipv6", DEFAULT_DISABLE_IPV6)) {
|
||||
SetReachable(NET_IPV6, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user