summaryrefslogtreecommitdiffhomepage
path: root/table/destination.go
diff options
context:
space:
mode:
Diffstat (limited to 'table/destination.go')
-rw-r--r--table/destination.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/table/destination.go b/table/destination.go
index 50d779df..2216abca 100644
--- a/table/destination.go
+++ b/table/destination.go
@@ -234,7 +234,7 @@ func (dd *Destination) validatePath(path *Path) {
//
// Modifies destination's state related to stored paths. Removes withdrawn
// paths from known paths. Also, adds new paths to known paths.
-func (dest *Destination) Calculate(ids []string) (map[string]*Path, map[string]*Path, []*Path) {
+func (dest *Destination) Calculate(ids []string, peerDown bool) (map[string]*Path, map[string]*Path, []*Path) {
bestList := make(map[string]*Path, len(ids))
oldList := make(map[string]*Path, len(ids))
oldKnownPathList := dest.knownPathList
@@ -272,6 +272,13 @@ func (dest *Destination) Calculate(ids []string) (map[string]*Path, map[string]*
if old == nil {
return nil, nil
}
+ if peerDown {
+ // withdraws were generated by peer
+ // down so paths are not in knowpath
+ // or adjin.
+ old.IsWithdraw = true
+ return old, old
+ }
return old.Clone(true), old
}
return best, old