summaryrefslogtreecommitdiffhomepage
path: root/table/table_manager.go
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2015-07-22 13:24:31 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2015-07-22 14:49:46 +0900
commita4501ccc3f680de0a9f9cc8621256d71d3679478 (patch)
tree1ab8e04fb4c6c39f512be1e9f76c26c78a127ac7 /table/table_manager.go
parent3409f6a5443cf0d6cf0d318feba845f237cd14ba (diff)
mrt: support mrt dump
$ gobgp mrt dump 10 -o ./dump Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/table_manager.go')
-rw-r--r--table/table_manager.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/table/table_manager.go b/table/table_manager.go
index 4a692d23..65ead593 100644
--- a/table/table_manager.go
+++ b/table/table_manager.go
@@ -138,7 +138,7 @@ func (manager *TableManager) calculate(destinationList []*Destination) ([]*Path,
log.WithFields(log.Fields{
"Topic": "table",
"Owner": manager.owner,
- "Key": destination.getNlri().String(),
+ "Key": destination.GetNlri().String(),
}).Debug("Processing destination")
newBestPath, reason, err := destination.Calculate(manager.localAsn)
@@ -156,7 +156,7 @@ func (manager *TableManager) calculate(destinationList []*Destination) ([]*Path,
log.WithFields(log.Fields{
"Topic": "table",
"Owner": manager.owner,
- "Key": destination.getNlri().String(),
+ "Key": destination.GetNlri().String(),
"peer": newBestPath.GetSource().Address,
"next_hop": newBestPath.GetNexthop().String(),
"reason": reason,
@@ -168,16 +168,16 @@ func (manager *TableManager) calculate(destinationList []*Destination) ([]*Path,
log.WithFields(log.Fields{
"Topic": "table",
"Owner": manager.owner,
- "Key": destination.getNlri().String(),
+ "Key": destination.GetNlri().String(),
}).Debug("best path is nil")
- if len(destination.getKnownPathList()) == 0 {
+ if len(destination.GetKnownPathList()) == 0 {
// create withdraw path
if currentBestPath != nil {
log.WithFields(log.Fields{
"Topic": "table",
"Owner": manager.owner,
- "Key": destination.getNlri().String(),
+ "Key": destination.GetNlri().String(),
"peer": currentBestPath.GetSource().Address,
"next_hop": currentBestPath.GetNexthop().String(),
}).Debug("best path is lost")
@@ -190,7 +190,7 @@ func (manager *TableManager) calculate(destinationList []*Destination) ([]*Path,
log.WithFields(log.Fields{
"Topic": "table",
"Owner": manager.owner,
- "Key": destination.getNlri().String(),
+ "Key": destination.GetNlri().String(),
}).Error("known path list is not empty")
}
} else {
@@ -207,14 +207,14 @@ func (manager *TableManager) calculate(destinationList []*Destination) ([]*Path,
destination.setBestPath(newBestPath)
}
- if len(destination.getKnownPathList()) == 0 && destination.GetBestPath() == nil {
+ if len(destination.GetKnownPathList()) == 0 && destination.GetBestPath() == nil {
rf := destination.getRouteFamily()
t := manager.Tables[rf]
t.deleteDest(destination)
log.WithFields(log.Fields{
"Topic": "table",
"Owner": manager.owner,
- "Key": destination.getNlri().String(),
+ "Key": destination.GetNlri().String(),
"route_family": rf,
}).Debug("destination removed")
}
@@ -297,8 +297,8 @@ func (adj *AdjRib) update(rib map[bgp.RouteFamily]map[string]*ReceivedRoute, pat
delete(rib[rf], key)
}
} else {
- if found && reflect.DeepEqual(old.path.getPathAttrs(), path.getPathAttrs()) {
- path.setTimestamp(old.path.getTimestamp())
+ if found && reflect.DeepEqual(old.path.GetPathAttrs(), path.GetPathAttrs()) {
+ path.setTimestamp(old.path.GetTimestamp())
}
rib[rf][key] = NewReceivedRoute(path, false)
}