summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorMagesh GV <mageshgv@gmail.com>2019-09-30 10:36:54 -0700
committerFUJITA Tomonori <fujita.tomonori@gmail.com>2019-10-02 20:45:44 +0900
commit6f3cb401644fcba0353ac06de261dd40100daa84 (patch)
tree0602d523c17bccf5ebf5ee15eb8c5c07bd19d39a /pkg
parent93beafeec5ec667602afe506f2692db81344d5a7 (diff)
Update adjrib for LLGR and preserve aslooped attr
Fixes LLGR community cleared on softreset. Fixes AS Path looped routes added back to rib on Graceful Restart.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/server/peer.go18
1 files changed, 1 insertions, 17 deletions
diff --git a/pkg/server/peer.go b/pkg/server/peer.go
index 7d85ec52..a7843f49 100644
--- a/pkg/server/peer.go
+++ b/pkg/server/peer.go
@@ -333,23 +333,7 @@ func (peer *peer) llgrRestartTimerExpired(family bgp.RouteFamily) bool {
}
func (peer *peer) markLLGRStale(fs []bgp.RouteFamily) []*table.Path {
- paths := peer.adjRibIn.PathList(fs, true)
- for i, p := range paths {
- doStale := true
- for _, c := range p.GetCommunities() {
- if c == uint32(bgp.COMMUNITY_NO_LLGR) {
- doStale = false
- p = p.Clone(true)
- break
- }
- }
- if doStale {
- p = p.Clone(false)
- p.SetCommunities([]uint32{uint32(bgp.COMMUNITY_LLGR_STALE)}, false)
- }
- paths[i] = p
- }
- return paths
+ return peer.adjRibIn.MarkLLGRStaleOrDrop(fs)
}
func (peer *peer) stopPeerRestarting() {