summaryrefslogtreecommitdiffhomepage
path: root/table/destination.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/destination.go')
-rw-r--r--table/destination.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/table/destination.go b/table/destination.go
index c71e4464..aeabfbd0 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -495,8 +495,8 @@ func compareByLocalPref(path1, path2 Path) Path {
//
// # Default local-pref values is 100
logger.Debugf("enter compareByLocalPref")
- attribute1 := path1.getPathAttribute(bgp.BGP_ATTR_TYPE_LOCAL_PREF)
- attribute2 := path2.getPathAttribute(bgp.BGP_ATTR_TYPE_LOCAL_PREF)
+ _, attribute1 := path1.GetPathAttr(bgp.BGP_ATTR_TYPE_LOCAL_PREF)
+ _, attribute2 := path2.GetPathAttr(bgp.BGP_ATTR_TYPE_LOCAL_PREF)
if attribute1 == nil || attribute2 == nil {
return nil
@@ -546,8 +546,8 @@ func compareByASPath(path1, path2 Path) Path {
// Shortest as-path length is preferred. If both path have same lengths,
// we return None.
logger.Debugf("enter compareByASPath")
- attribute1 := path1.getPathAttribute(bgp.BGP_ATTR_TYPE_AS_PATH)
- attribute2 := path2.getPathAttribute(bgp.BGP_ATTR_TYPE_AS_PATH)
+ _, attribute1 := path1.GetPathAttr(bgp.BGP_ATTR_TYPE_AS_PATH)
+ _, attribute2 := path2.GetPathAttr(bgp.BGP_ATTR_TYPE_AS_PATH)
asPath1 := attribute1.(*bgp.PathAttributeAsPath)
asPath2 := attribute2.(*bgp.PathAttributeAsPath)
@@ -583,8 +583,8 @@ func compareByOrigin(path1, path2 Path) Path {
// IGP is preferred over EGP; EGP is preferred over Incomplete.
// If both paths have same origin, we return None.
logger.Debugf("enter compareByOrigin")
- attribute1 := path1.getPathAttribute(bgp.BGP_ATTR_TYPE_ORIGIN)
- attribute2 := path2.getPathAttribute(bgp.BGP_ATTR_TYPE_ORIGIN)
+ _, attribute1 := path1.GetPathAttr(bgp.BGP_ATTR_TYPE_ORIGIN)
+ _, attribute2 := path2.GetPathAttr(bgp.BGP_ATTR_TYPE_ORIGIN)
if attribute1 == nil || attribute2 == nil {
logger.Error("it is not possible to compare origin are not present")
@@ -617,7 +617,7 @@ func compareByMED(path1, path2 Path) Path {
// like bgp always-compare-med
logger.Debugf("enter compareByMED")
getMed := func(path Path) uint32 {
- attribute := path.getPathAttribute(bgp.BGP_ATTR_TYPE_MULTI_EXIT_DISC)
+ _, attribute := path.GetPathAttr(bgp.BGP_ATTR_TYPE_MULTI_EXIT_DISC)
if attribute == nil {
return 0
}