summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-08-17 16:50:58 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-08-19 13:29:33 +0900
commit79ed96fdc1a171de4b13108c7ca9c154d6d7fcd4 (patch)
treebfd691f15f5a369d1717112cc95d61cf19d843a4 /table/path.go
parentc14a63575c62addaf96c78f4de9aef6e3c430f0f (diff)
table: fix best path selection which considers local asn
TableManager.localAsn wasn't used. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/path.go')
-rw-r--r--table/path.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/table/path.go b/table/path.go
index 7e131185..f4f1893b 100644
--- a/table/path.go
+++ b/table/path.go
@@ -135,11 +135,11 @@ func (path *Path) setTimestamp(t time.Time) {
}
func (path *Path) IsLocal() bool {
- var ret bool
- if path.source.Address == nil {
- ret = true
- }
- return ret
+ return path.source.Address == nil
+}
+
+func (path *Path) IsIBGP() bool {
+ return path.source.AS == path.source.LocalAS
}
func (path *Path) ToApiStruct() *api.Path {