mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-03-23 20:35:20 +00:00
Remove a few old comments
This commit is contained in:
parent
e7891bfcb0
commit
b1ddba0438
@ -87,7 +87,9 @@ public:
|
||||
std::string policyAlias() { return _policyAlias; }
|
||||
|
||||
/**
|
||||
* Inform the bond about the path that its peer (owning object) just learned about
|
||||
* Inform the bond about the path that its peer (owning object) just learned about.
|
||||
* If the path is allowed to be used, it will be inducted into the bond on a trial
|
||||
* period where link statistics will be collected to judge its quality.
|
||||
*
|
||||
* @param path Newly-learned Path which should now be handled by the Bond
|
||||
* @param now Current time
|
||||
|
@ -1630,7 +1630,6 @@ public:
|
||||
// Custom Policies
|
||||
json &customBondingPolicies = settings["policies"];
|
||||
for (json::iterator policyItr = customBondingPolicies.begin(); policyItr != customBondingPolicies.end();++policyItr) {
|
||||
//fprintf(stderr, "\n\n--- (%s)\n", policyItr.key().c_str());
|
||||
// Custom Policy
|
||||
std::string customPolicyStr(policyItr.key());
|
||||
json &customPolicy = policyItr.value();
|
||||
@ -1684,7 +1683,6 @@ public:
|
||||
// Policy-Specific link set
|
||||
json &links = customPolicy["links"];
|
||||
for (json::iterator linkItr = links.begin(); linkItr != links.end();++linkItr) {
|
||||
//fprintf(stderr, "\t--- link (%s)\n", linkItr.key().c_str());
|
||||
std::string linkNameStr(linkItr.key());
|
||||
json &link = linkItr.value();
|
||||
|
||||
@ -1719,12 +1717,19 @@ public:
|
||||
}
|
||||
_node->bondController()->addCustomLink(customPolicyStr, new Link(linkNameStr,ipvPref,speed,linkMonitorInterval,upDelay,downDelay,enabled,linkMode,failoverToStr,alloc));
|
||||
}
|
||||
// TODO: This is dumb
|
||||
std::string linkSelectMethodStr(OSUtils::jsonString(customPolicy["activeReselect"],"optimize"));
|
||||
if (linkSelectMethodStr == "always") { newTemplateBond->setLinkSelectMethod(ZT_MULTIPATH_RESELECTION_POLICY_ALWAYS); }
|
||||
if (linkSelectMethodStr == "better") { newTemplateBond->setLinkSelectMethod(ZT_MULTIPATH_RESELECTION_POLICY_BETTER); }
|
||||
if (linkSelectMethodStr == "failure") { newTemplateBond->setLinkSelectMethod(ZT_MULTIPATH_RESELECTION_POLICY_FAILURE); }
|
||||
if (linkSelectMethodStr == "optimize") { newTemplateBond->setLinkSelectMethod(ZT_MULTIPATH_RESELECTION_POLICY_OPTIMIZE); }
|
||||
if (linkSelectMethodStr == "always") {
|
||||
newTemplateBond->setLinkSelectMethod(ZT_MULTIPATH_RESELECTION_POLICY_ALWAYS);
|
||||
}
|
||||
if (linkSelectMethodStr == "better") {
|
||||
newTemplateBond->setLinkSelectMethod(ZT_MULTIPATH_RESELECTION_POLICY_BETTER);
|
||||
}
|
||||
if (linkSelectMethodStr == "failure") {
|
||||
newTemplateBond->setLinkSelectMethod(ZT_MULTIPATH_RESELECTION_POLICY_FAILURE);
|
||||
}
|
||||
if (linkSelectMethodStr == "optimize") {
|
||||
newTemplateBond->setLinkSelectMethod(ZT_MULTIPATH_RESELECTION_POLICY_OPTIMIZE);
|
||||
}
|
||||
if (newTemplateBond->getLinkSelectMethod() < 0 || newTemplateBond->getLinkSelectMethod() > 3) {
|
||||
fprintf(stderr, "warning: invalid value (%s) for linkSelectMethod, assuming mode: always\n", linkSelectMethodStr.c_str());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user