From 614746ca1159fe421047df04c5af6f07c38b2e65 Mon Sep 17 00:00:00 2001 From: Wataru Ishida Date: Sun, 9 Oct 2016 07:18:13 -0700 Subject: *: support long lived graceful restart Signed-off-by: Wataru Ishida --- table/path.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'table/path.go') diff --git a/table/path.go b/table/path.go index b0f21e04..f8058730 100644 --- a/table/path.go +++ b/table/path.go @@ -348,6 +348,15 @@ func (path *Path) IsStale() bool { return path.OriginInfo().stale } +func (path *Path) IsLLGRStale() bool { + for _, c := range path.GetCommunities() { + if c == bgp.COMMUNITY_LLGR_STALE { + return true + } + } + return false +} + func (path *Path) GetSourceAs() uint32 { attr := path.getPathAttr(bgp.BGP_ATTR_TYPE_AS_PATH) if attr != nil { -- cgit v1.2.3