mirror of
https://github.com/rancher/plugins.git
synced 2025-07-09 21:25:28 +00:00
Reset the route flag before moving the rule
Signed-off-by: ahenan <ahenan00@gmail.com>
This commit is contained in:
parent
117e30ff21
commit
2a48d68937
@ -296,6 +296,10 @@ func doRoutes(ipCfgs []*current.IPConfig, origRoutes []*types.Route, iface strin
|
|||||||
|
|
||||||
route.Table = table
|
route.Table = table
|
||||||
|
|
||||||
|
// Reset the route flags since if it is dynamically created,
|
||||||
|
// adding it to the new table will fail with "invalid argument"
|
||||||
|
route.Flags = 0
|
||||||
|
|
||||||
// We use route replace in case the route already exists, which
|
// We use route replace in case the route already exists, which
|
||||||
// is possible for the default gateway we added above.
|
// is possible for the default gateway we added above.
|
||||||
err = netlink.RouteReplace(&route)
|
err = netlink.RouteReplace(&route)
|
||||||
|
Loading…
Reference in New Issue
Block a user