summaryrefslogtreecommitdiffhomepage
path: root/table/path.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/path.go')
-rw-r--r--table/path.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/table/path.go b/table/path.go
index 635cbf5d..4d4e0c44 100644
--- a/table/path.go
+++ b/table/path.go
@@ -27,7 +27,7 @@ import (
type Path interface {
String() string
GetPathAttrs() []bgp.PathAttributeInterface
- GetPathAttr(int) (int, bgp.PathAttributeInterface)
+ GetPathAttr(bgp.BGPAttrType) (int, bgp.PathAttributeInterface)
getRouteFamily() RouteFamily
setSource(source *PeerInfo)
getSource() *PeerInfo
@@ -193,7 +193,7 @@ func (pd *PathDefault) GetPathAttrs() []bgp.PathAttributeInterface {
return pd.pathAttrs
}
-func (pd *PathDefault) GetPathAttr(pattrType int) (int, bgp.PathAttributeInterface) {
+func (pd *PathDefault) GetPathAttr(pattrType bgp.BGPAttrType) (int, bgp.PathAttributeInterface) {
attrMap := [bgp.BGP_ATTR_TYPE_AS4_AGGREGATOR + 1]reflect.Type{}
attrMap[bgp.BGP_ATTR_TYPE_ORIGIN] = reflect.TypeOf(&bgp.PathAttributeOrigin{})
attrMap[bgp.BGP_ATTR_TYPE_AS_PATH] = reflect.TypeOf(&bgp.PathAttributeAsPath{})