mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 04:53:44 +02:00
Fix MATCH_RANDOM in controller.
This commit is contained in:
parent
2eaff6d484
commit
fe530548bb
2 changed files with 2 additions and 0 deletions
|
@ -428,6 +428,7 @@ static bool _parseRule(json &r,ZT_VirtualNetworkRule &rule)
|
||||||
} else if (t == "MATCH_RANDOM") {
|
} else if (t == "MATCH_RANDOM") {
|
||||||
rule.t |= ZT_NETWORK_RULE_MATCH_RANDOM;
|
rule.t |= ZT_NETWORK_RULE_MATCH_RANDOM;
|
||||||
rule.v.randomProbability = (uint32_t)(_jI(r["probability"],0ULL) & 0xffffffffULL);
|
rule.v.randomProbability = (uint32_t)(_jI(r["probability"],0ULL) & 0xffffffffULL);
|
||||||
|
return true;
|
||||||
} else if (t == "MATCH_TAGS_DIFFERENCE") {
|
} else if (t == "MATCH_TAGS_DIFFERENCE") {
|
||||||
rule.t |= ZT_NETWORK_RULE_MATCH_TAGS_DIFFERENCE;
|
rule.t |= ZT_NETWORK_RULE_MATCH_TAGS_DIFFERENCE;
|
||||||
rule.v.tag.id = (uint32_t)(_jI(r["id"],0ULL) & 0xffffffffULL);
|
rule.v.tag.id = (uint32_t)(_jI(r["id"],0ULL) & 0xffffffffULL);
|
||||||
|
|
|
@ -111,6 +111,7 @@ static const void _dumpFilterTrace(const char *ruleName,uint8_t thisSetMatches,b
|
||||||
);
|
);
|
||||||
if (msg)
|
if (msg)
|
||||||
printf(" + (%s)" ZT_EOL_S,msg);
|
printf(" + (%s)" ZT_EOL_S,msg);
|
||||||
|
fflush(stdout);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define FILTER_TRACE(f,...) {}
|
#define FILTER_TRACE(f,...) {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue