Skip to content

Commit

Permalink
update gateway route
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaeryn committed Nov 13, 2023
1 parent 40bc054 commit 6be9cd4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions network/secondary_endpoint_client_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ func (client *SecondaryEndpointClient) ConfigureContainerInterfacesAndRoutes(epI
return newErrorSecondaryEndpointClient(errors.New("routes expected for " + epInfo.IfName))
}

// virtual gw route needs to be scope link
for i := range epInfo.Routes {
if epInfo.Routes[i].Gw == nil {
epInfo.Routes[i].Scope = netlink.RT_SCOPE_LINK
}
}

if err := addRoutes(client.netlink, client.netioshim, epInfo.IfName, epInfo.Routes); err != nil {
return newErrorSecondaryEndpointClient(err)
}
Expand Down

0 comments on commit 6be9cd4

Please sign in to comment.