From 188778603e9e0d4ba14adb93e2602a959b01bd7e Mon Sep 17 00:00:00 2001 From: zvfvrv Date: Wed, 21 Jul 2021 12:26:30 +0200 Subject: fixed possible crash if nlriToIPNet result is null --- internal/pkg/table/policy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/pkg/table/policy.go b/internal/pkg/table/policy.go index 409989a0..958342a1 100644 --- a/internal/pkg/table/policy.go +++ b/internal/pkg/table/policy.go @@ -1453,6 +1453,9 @@ func (c *PrefixCondition) Evaluate(path *Path, _ *PolicyOptions) bool { } r := nlriToIPNet(path.GetNlri()) + if r == nil { + return false + } ones, _ := r.Mask.Size() masklen := uint8(ones) result := false -- cgit v1.2.3