Pass status along ipam update

Signed-off-by: Lionel Jouin <lionel.jouin@est.tech>
This commit is contained in:
Lionel Jouin
2024-09-30 17:18:23 +02:00
committed by Casey Callendrello
parent a4fc6f93c7
commit fec2d62676
23 changed files with 348 additions and 54 deletions

View File

@ -128,6 +128,14 @@ func ConfigureIface(ifName string, res *current.Result) error {
route.Scope = netlink.Scope(*r.Scope)
}
if r.Table != nil {
route.Table = *r.Table
}
if r.Scope != nil {
route.Scope = netlink.Scope(*r.Scope)
}
if err = netlink.RouteAddEcmp(&route); err != nil {
return fmt.Errorf("failed to add route '%v via %v dev %v metric %d (Scope: %v, Table: %d)': %v", r.Dst, gw, ifName, r.Priority, route.Scope, route.Table, err)
}