Skip to content

Commit

Permalink
Merge pull request #70 from cloudnativelabs/route-cleanup
Browse files Browse the repository at this point in the history
on BGP peer down, advertised route from peer is not cleaned-up in local routing table
  • Loading branch information
murali-reddy authored Jul 17, 2017
2 parents 8023021 + fb09646 commit e8ce4a9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/controllers/network_routes_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ func (nrc *NetworkRoutingController) injectRoute(path *table.Path) error {
Protocol: 0x11,
}

if path.IsWithdraw {
glog.Infof("Removing route: '%s via %s' from peer in the routing table", dst, nexthop)
return netlink.RouteDel(route)
}
glog.Infof("Inject route: '%s via %s' from peer to routing table", dst, nexthop)
return netlink.RouteReplace(route)
}
Expand Down

0 comments on commit e8ce4a9

Please sign in to comment.