From a53d1945056b6c43c1de5dcaafc5ef92fcd33614 Mon Sep 17 00:00:00 2001 From: Naoto Hanaue Date: Fri, 26 Feb 2016 19:55:28 +0900 Subject: ops: fix and integration the attribute name that indicates the route received from an external resource --- server/server.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'server/server.go') diff --git a/server/server.go b/server/server.go index 70cafeaa..8a3b8f83 100644 --- a/server/server.go +++ b/server/server.go @@ -673,7 +673,7 @@ func (server *BgpServer) broadcastValidationResults(results []*api.ROAResult) { func (server *BgpServer) broadcastBests(bests []*table.Path) { for _, path := range bests { - if !path.IsFromZebra() { + if !path.IsFromExternal() { z := newBroadcastZapiBestMsg(server.zclient, path) if z != nil { server.broadcastMsgs = append(server.broadcastMsgs, z) @@ -1437,8 +1437,9 @@ func (server *BgpServer) Api2PathList(resource api.Resource, name string, ApiPat if len(extcomms) > 0 { pattr = append(pattr, bgp.NewPathAttributeExtendedCommunities(extcomms)) } - - paths = append(paths, table.NewPath(pi, nlri, path.IsWithdraw, pattr, time.Now(), path.NoImplicitWithdraw, path.IsFromOps)) + newPath := table.NewPath(pi, nlri, path.IsWithdraw, pattr, time.Now(), path.NoImplicitWithdraw) + newPath.SetIsFromExternal(path.IsFromExternal) + paths = append(paths, newPath) } return paths, nil -- cgit v1.2.3