summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-09-29 15:50:50 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-10-03 14:39:43 +0900
commit0db5461625d75fc85f1a1144d17af8d0f61b5473 (patch)
treedced1fdc1231a73f61c47a95e2eab2e9962fbb58 /table
parent9c03026c4c1129f5eb895f64f3923bbfbe1f111f (diff)
table: Implement ignore-as-path-length
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Diffstat (limited to 'table')
-rw-r--r--table/destination.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/table/destination.go b/table/destination.go
index 9a26b4d3..0ad0f6f9 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -740,6 +740,12 @@ func compareByASPath(path1, path2 *Path) *Path {
//
// Shortest as-path length is preferred. If both path have same lengths,
// we return None.
+ if SelectionOptions.IgnoreAsPathLength {
+ log.WithFields(log.Fields{
+ "Topic": "Table",
+ }).Debug("compareByASPath -- skip")
+ return nil
+ }
log.WithFields(log.Fields{
"Topic": "Table",
}).Debug("enter compareByASPath")