summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-20 16:02:32 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-01-20 16:02:32 +0900
commit355e5790dfd4a5941cd5c93586473819cc7e3bbd (patch)
treef478c5b8500fa404125beaf6a903e5c4943071b5 /table/path.go
parentb27eed1b8670ed7612129263741ef48ae2bfa1b4 (diff)
table: remove Path's best
Path can be shared in multiple local ribs so having "best" in Path is wrong. The info "best" path is stored in Destination so CLI uses it. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/path.go')
-rw-r--r--table/path.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/table/path.go b/table/path.go
index 276555ee..027630cb 100644
--- a/table/path.go
+++ b/table/path.go
@@ -40,7 +40,6 @@ type Path interface {
setMedSetByTargetNeighbor(medSetByTargetNeighbor bool)
getMedSetByTargetNeighbor() bool
clone(IsWithdraw bool) Path
- setBest(isBest bool)
MarshalJSON() ([]byte, error)
}
@@ -52,7 +51,6 @@ type PathDefault struct {
nlri bgp.AddrPrefixInterface
pathAttrs []bgp.PathAttributeInterface
medSetByTargetNeighbor bool
- isBest bool
}
func NewPathDefault(rf bgp.RouteFamily, source *PeerInfo, nlri bgp.AddrPrefixInterface, nexthop net.IP, isWithdraw bool, pattrs []bgp.PathAttributeInterface, medSetByTargetNeighbor bool) *PathDefault {
@@ -73,21 +71,15 @@ func NewPathDefault(rf bgp.RouteFamily, source *PeerInfo, nlri bgp.AddrPrefixInt
return path
}
-func (pd *PathDefault) setBest(isBest bool) {
- pd.isBest = isBest
-}
-
func (pd *PathDefault) MarshalJSON() ([]byte, error) {
return json.Marshal(struct {
Network string
Nexthop string
Attrs []bgp.PathAttributeInterface
- Best string
}{
Network: pd.getPrefix(),
Nexthop: pd.nexthop.String(),
Attrs: pd.getPathAttrs(),
- Best: fmt.Sprint(pd.isBest),
})
}