From 2a48d68937184d206818fec3d77cff7f7c606440 Mon Sep 17 00:00:00 2001 From: ahenan <> Date: Mon, 6 Apr 2020 02:36:48 +0200 Subject: [PATCH] Reset the route flag before moving the rule Signed-off-by: ahenan --- plugins/meta/sbr/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/meta/sbr/main.go b/plugins/meta/sbr/main.go index 10dcb655..15727365 100644 --- a/plugins/meta/sbr/main.go +++ b/plugins/meta/sbr/main.go @@ -296,6 +296,10 @@ func doRoutes(ipCfgs []*current.IPConfig, origRoutes []*types.Route, iface strin 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 // is possible for the default gateway we added above. err = netlink.RouteReplace(&route)