Skip to content

Commit

Permalink
fix: VRF table origin for SR policy (fixes #1566) (#1578)
Browse files Browse the repository at this point in the history
fix: VRF table origin for SR policy (fixes #1566)
  • Loading branch information
ondrej-fabry authored Dec 6, 2019
2 parents 2d85061 + 03e8635 commit 46203c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/vpp/l3plugin/descriptor/vrf_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package descriptor

import (
"fmt"
"math"
"strings"

"github.com/ligato/cn-infra/idxmap"
Expand Down Expand Up @@ -140,7 +141,9 @@ func (d *VrfTableDescriptor) Retrieve(correlate []adapter.VrfTableKVWithMetadata

for _, table := range tables {
origin := kvs.UnknownOrigin
if table.Id > 0 {
// VRF with ID=0 and ID=MaxUint32 are special
// and should not be removed automatically
if table.Id > 0 && table.Id < math.MaxUint32 {
origin = kvs.FromNB
}
retrieved = append(retrieved, adapter.VrfTableKVWithMetadata{
Expand Down

0 comments on commit 46203c6

Please sign in to comment.