diff options
author | Magesh GV <mageshgv@gmail.com> | 2019-09-30 10:36:54 -0700 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@gmail.com> | 2019-10-02 20:45:44 +0900 |
commit | 6f3cb401644fcba0353ac06de261dd40100daa84 (patch) | |
tree | 0602d523c17bccf5ebf5ee15eb8c5c07bd19d39a /internal/pkg/table/path.go | |
parent | 93beafeec5ec667602afe506f2692db81344d5a7 (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 'internal/pkg/table/path.go')
-rw-r--r-- | internal/pkg/table/path.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/internal/pkg/table/path.go b/internal/pkg/table/path.go index 32616d2e..9f68fde3 100644 --- a/internal/pkg/table/path.go +++ b/internal/pkg/table/path.go @@ -398,6 +398,15 @@ func (path *Path) SetDropped(y bool) { path.dropped = y } +func (path *Path) HasNoLLGR() bool { + for _, c := range path.GetCommunities() { + if c == uint32(bgp.COMMUNITY_NO_LLGR) { + return true + } + } + return false +} + func (path *Path) IsLLGRStale() bool { for _, c := range path.GetCommunities() { if c == uint32(bgp.COMMUNITY_LLGR_STALE) { |