diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-01-13 23:28:29 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-01-13 23:28:29 +0900 |
commit | 529bec9f5c907bb9b93c6e5c7287b6985ff1ee03 (patch) | |
tree | 159e4b5b013a49139a169ad2e61d47c0ae930119 /table/path.go | |
parent | 78ec2585b7f8c1cb4f20d9c0283b3251b30669d3 (diff) |
table: fix best path presentation
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/path.go')
-rw-r--r-- | table/path.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/table/path.go b/table/path.go index 78fa111c..f2926cf3 100644 --- a/table/path.go +++ b/table/path.go @@ -70,7 +70,6 @@ func NewPathDefault(rf bgp.RouteFamily, source *PeerInfo, nlri bgp.AddrPrefixInt path.nexthop = nexthop path.withdraw = isWithdraw path.medSetByTargetNeighbor = medSetByTargetNeighbor - path.isBest = false return path } @@ -94,15 +93,12 @@ func (pd *PathDefault) MarshalJSON() ([]byte, error) { Network string Nexthop string Attrs []bgp.PathAttributeInterface - //Metric string - //origin string - Best string + Best string }{ Network: prefix.String() + "/" + fmt.Sprint(prefixLen), Nexthop: pd.nexthop.String(), - //Metric: fmt.Sprint(med), - Attrs: pd.getPathAttrs(), - Best: fmt.Sprint(pd.isBest), + Attrs: pd.getPathAttrs(), + Best: fmt.Sprint(pd.isBest), }) } |