summaryrefslogtreecommitdiffhomepage
path: root/server/server.go
diff options
context:
space:
mode:
authorNaoto Hanaue <hanaue.naoto@po.ntts.co.jp>2016-02-26 19:55:28 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2016-02-27 03:47:00 -0800
commita53d1945056b6c43c1de5dcaafc5ef92fcd33614 (patch)
tree318edb562c31ec11708fea1282cb8cded6ea870d /server/server.go
parentb334dd4185bc91afd405ba326a03c09cfe9a9623 (diff)
ops: fix and integration the attribute name that indicates the route received from an external resource
Diffstat (limited to 'server/server.go')
-rw-r--r--server/server.go7
1 files changed, 4 insertions, 3 deletions
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