diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-07-27 12:42:33 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-07-27 12:42:33 +0900 |
commit | e117ae78ce8761b77b3d234b18464d0b0e1e35fe (patch) | |
tree | 89c7739eeedda1502d2c506fb69016fe7106224c /table/destination.go | |
parent | e7b9739c9f8600ac57c1ddb56cbdf3c62b4c1692 (diff) |
table: disable wrong warning about aspath
With addpath support, two paths from API without AS_PATH attribute
could be compared.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table/destination.go')
-rw-r--r-- | table/destination.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/table/destination.go b/table/destination.go index 9057d4f4..15d80e1d 100644 --- a/table/destination.go +++ b/table/destination.go @@ -736,7 +736,9 @@ func compareByASPath(path1, path2 *Path) *Path { attribute1 := path1.getPathAttr(bgp.BGP_ATTR_TYPE_AS_PATH) attribute2 := path2.getPathAttr(bgp.BGP_ATTR_TYPE_AS_PATH) - if attribute1 == nil || attribute2 == nil { + // With addpath support, we could compare paths from API don't + // AS_PATH. No need to warn here. + if !path1.IsLocal() && !path2.IsLocal() && (attribute1 == nil || attribute2 == nil) { log.WithFields(log.Fields{ "Topic": "Table", "Key": "compareByASPath", |