return routes for unknown next hops

pull/6/head
Fabian Ruff 2017-11-22 23:44:07 +01:00 committed by GitHub
parent 93dc3763b0
commit 2e177ef9b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -77,15 +77,9 @@ func (r *Routes) ListRoutes(clusterName string) ([]*cloudprovider.Route, error)
var routes []*cloudprovider.Route
for _, item := range router.Routes {
nodeName, ok := nodeNamesByAddr[item.NextHop]
if !ok {
// Not one of our routes?
glog.V(4).Infof("Skipping route with unknown nexthop %v", item.NextHop)
continue
}
route := cloudprovider.Route{
Name: item.DestinationCIDR,
TargetNode: nodeName,
TargetNode: nodeNamesByAddr[item.NextHop], //empty if NextHop is unknown
DestinationCIDR: item.DestinationCIDR,
}
routes = append(routes, &route)