Skip to content
Snippets Groups Projects
Commit ed30b51f authored by Oliver Herms's avatar Oliver Herms
Browse files

Fix route withdraw when using BGP add path TX

parent 9be746a5
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