summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--policy/policy.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/policy/policy.go b/policy/policy.go
index 1fd2f017..80598c9e 100644
--- a/policy/policy.go
+++ b/policy/policy.go
@@ -1407,7 +1407,7 @@ func ipPrefixCalculate(path *table.Path, cPrefix Prefix) bool {
return false
}
- return cPrefix.Prefix.Contains(pAddr) && (cPrefix.MasklengthRangeMin <= pMasklen && pMasklen <= cPrefix.MasklengthRangeMax)
+ return (cPrefix.MasklengthRangeMin <= pMasklen && pMasklen <= cPrefix.MasklengthRangeMax) && cPrefix.Prefix.Contains(pAddr)
}
const (