summaryrefslogtreecommitdiffhomepage
path: root/internal/pkg/table/policy.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/pkg/table/policy.go')
-rw-r--r--internal/pkg/table/policy.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/pkg/table/policy.go b/internal/pkg/table/policy.go
index d2e4f5ef..f4bcf0a4 100644
--- a/internal/pkg/table/policy.go
+++ b/internal/pkg/table/policy.go
@@ -1439,7 +1439,10 @@ func (c *PrefixCondition) Option() MatchOption {
// subsequent comparison is skipped if that matches the conditions.
// If PrefixList's length is zero, return true.
func (c *PrefixCondition) Evaluate(path *Path, _ *PolicyOptions) bool {
- if path.GetRouteFamily() != c.set.family {
+ pathAfi, _ := bgp.RouteFamilyToAfiSafi(path.GetRouteFamily())
+ cAfi, _ := bgp.RouteFamilyToAfiSafi(c.set.family)
+
+ if cAfi != pathAfi {
return false
}