mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-01-18 10:46:33 +00:00
Fix MATCH_RANDOM in controller.
This commit is contained in:
parent
2eaff6d484
commit
fe530548bb
@ -428,6 +428,7 @@ static bool _parseRule(json &r,ZT_VirtualNetworkRule &rule)
|
||||
} else if (t == "MATCH_RANDOM") {
|
||||
rule.t |= ZT_NETWORK_RULE_MATCH_RANDOM;
|
||||
rule.v.randomProbability = (uint32_t)(_jI(r["probability"],0ULL) & 0xffffffffULL);
|
||||
return true;
|
||||
} else if (t == "MATCH_TAGS_DIFFERENCE") {
|
||||
rule.t |= ZT_NETWORK_RULE_MATCH_TAGS_DIFFERENCE;
|
||||
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)
|
||||
printf(" + (%s)" ZT_EOL_S,msg);
|
||||
fflush(stdout);
|
||||
}
|
||||
#else
|
||||
#define FILTER_TRACE(f,...) {}
|
||||
|
Loading…
Reference in New Issue
Block a user