Skip to content
Snippets Groups Projects
Unverified Commit edd93f32 authored by Annika Wickert's avatar Annika Wickert Committed by GitHub
Browse files

Merge pull request #249 from bio-routing/fix/addPathTX

Fix route withdraw when using BGP add path TX
parents 9be746a5 ed30b51f
No related branches found
No related tags found
No related merge requests found
...@@ -185,18 +185,20 @@ func (a *AdjRIBOut) removePath(pfx *bnet.Prefix, p *route.Path) bool { ...@@ -185,18 +185,20 @@ func (a *AdjRIBOut) removePath(pfx *bnet.Prefix, p *route.Path) bool {
sentPath := p sentPath := p
if a.addPathTX { if a.addPathTX {
for _, sentPath := range r.Paths() { for _, sp := range r.Paths() {
if sentPath.Select(p) != 0 { if sp.Select(p) == 0 {
continue a.rt.RemovePath(pfx, sp)
_, err := a.pathIDManager.releasePath(p)
if err != nil {
log.Warningf("Unable to release path for prefix %s: %v", pfx.String(), err)
return true
}
sentPath = sp
break
} }
a.rt.RemovePath(pfx, sentPath)
_, err := a.pathIDManager.releasePath(p)
if err != nil {
log.Warningf("Unable to release path for prefix %s: %v", pfx.String(), err)
return true
}
} }
if sentPath == p { if sentPath == p {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment