summaryrefslogtreecommitdiffhomepage
path: root/table/table_manager.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/table_manager.go')
-rw-r--r--table/table_manager.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/table/table_manager.go b/table/table_manager.go
index 242b8ae2..a6fda7e3 100644
--- a/table/table_manager.go
+++ b/table/table_manager.go
@@ -18,6 +18,7 @@ package table
import (
log "github.com/Sirupsen/logrus"
"github.com/osrg/gobgp/packet"
+ "reflect"
"time"
)
@@ -246,12 +247,15 @@ func (adj *AdjRib) update(rib map[bgp.RouteFamily]map[string]*ReceivedRoute, pat
for _, path := range pathList {
rf := path.GetRouteFamily()
key := path.getPrefix()
+ old, found := rib[rf][key]
if path.IsWithdraw() {
- _, found := rib[rf][key]
if found {
delete(rib[rf], key)
}
} else {
+ if found && reflect.DeepEqual(old.path.getPathAttrs(), path.getPathAttrs()) {
+ path.setTimestamp(old.path.getTimestamp())
+ }
rib[rf][key] = NewReceivedRoute(path, false)
}
}