summaryrefslogtreecommitdiffhomepage
path: root/table
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-27 22:56:26 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-10-27 23:10:55 +0900
commitd6360e2b32932354b300db2c7e7f28b584fb39a2 (patch)
treee230bd3c4b5f27fa4f572640ead7109eb9109947 /table
parent38755839c3e153dbaaec666a74c4392e8ef2c5e3 (diff)
server: fix RPKI verification to handle ASPATH ATTR TYPE properly
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'table')
-rw-r--r--table/path.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/table/path.go b/table/path.go
index 3cebdb96..5e914975 100644
--- a/table/path.go
+++ b/table/path.go
@@ -327,6 +327,14 @@ func (path *Path) getPrefix() string {
return path.nlri.String()
}
+func (path *Path) GetAsPath() *bgp.PathAttributeAsPath {
+ _, attr := path.getPathAttr(bgp.BGP_ATTR_TYPE_AS_PATH)
+ if attr != nil {
+ return attr.(*bgp.PathAttributeAsPath)
+ }
+ return nil
+}
+
// GetAsPathLen returns the number of AS_PATH
func (path *Path) GetAsPathLen() int {