Skip to content

Commit e8ce4a9

Browse files
authored
Merge pull request #70 from cloudnativelabs/route-cleanup
on BGP peer down, advertised route from peer is not cleaned-up in local routing table
2 parents 8023021 + fb09646 commit e8ce4a9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/controllers/network_routes_controller.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,10 @@ func (nrc *NetworkRoutingController) injectRoute(path *table.Path) error {
223223
Protocol: 0x11,
224224
}
225225

226+
if path.IsWithdraw {
227+
glog.Infof("Removing route: '%s via %s' from peer in the routing table", dst, nexthop)
228+
return netlink.RouteDel(route)
229+
}
226230
glog.Infof("Inject route: '%s via %s' from peer to routing table", dst, nexthop)
227231
return netlink.RouteReplace(route)
228232
}

0 commit comments

Comments
 (0)