summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/path.go')
-rw-r--r--table/path.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/table/path.go b/table/path.go
index 812046bc..83e442c0 100644
--- a/table/path.go
+++ b/table/path.go
@@ -333,9 +333,8 @@ func (path *Path) GetAsPathLen() int {
var length int = 0
if _, attr := path.getPathAttr(bgp.BGP_ATTR_TYPE_AS_PATH); attr != nil {
aspath := attr.(*bgp.PathAttributeAsPath)
- for _, paramIf := range aspath.Value {
- segment := paramIf.(*bgp.As4PathParam)
- length += segment.ASLen()
+ for _, as := range aspath.Value {
+ length += as.ASLen()
}
}
return length