Limit float precision to 5 points

This commit is contained in:
Tim Hockin 2015-08-17 20:54:05 -07:00
parent 7e9c685ba6
commit 6f34be30a3

View File

@ -652,7 +652,7 @@ func (proxier *Proxier) syncProxyRules() error {
args = append(args,
"-m", "statistic",
"--mode", "random",
"--probability", fmt.Sprintf("%f", 1.0/float64(n-i)))
"--probability", fmt.Sprintf("%0.5f", 1.0/float64(n-i)))
}
// The final (or only if n == 1) rule is a guaranteed match.
args = append(args, "-j", string(endpointChain))