diff options
author | mageshgv <mageshgv@gmail.com> | 2019-10-04 10:24:19 -0700 |
---|---|---|
committer | mageshgv <mageshgv@gmail.com> | 2019-10-04 18:19:05 -0700 |
commit | 0da37b02108d79fc902d1d6731c9245ff733dc84 (patch) | |
tree | d2191b4f25ff8be1525207352c8f440df8daac78 /pkg/server/server.go | |
parent | 6f3cb401644fcba0353ac06de261dd40100daa84 (diff) |
Maintain unique vrf IDs in watchEventBestPath vrf map
Fixes missing route propagation to proper vrfs in zapi
Diffstat (limited to 'pkg/server/server.go')
-rw-r--r-- | pkg/server/server.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/server/server.go b/pkg/server/server.go index d6c54e10..c5dd18f3 100644 --- a/pkg/server/server.go +++ b/pkg/server/server.go @@ -708,13 +708,13 @@ func (s *BgpServer) notifyBestWatcher(best []*table.Path, multipath [][]*table.P clonedM[i] = clonePathList(pathList) } clonedB := clonePathList(best) - m := make(map[string]uint32) + m := make(map[uint32]bool) for _, p := range clonedB { switch p.GetRouteFamily() { case bgp.RF_IPv4_VPN, bgp.RF_IPv6_VPN: for _, vrf := range s.globalRib.Vrfs { if vrf.Id != 0 && table.CanImportToVrf(vrf, p) { - m[p.GetNlri().String()] = uint32(vrf.Id) + m[uint32(vrf.Id)] = true } } } @@ -3828,7 +3828,7 @@ type watchEventTable struct { type watchEventBestPath struct { PathList []*table.Path MultiPathList [][]*table.Path - Vrf map[string]uint32 + Vrf map[uint32]bool } type watchEventMessage struct { |