Skip to content

Commit e5682f1

Browse files
Merge pull request #20601 from squeed/sdn-route-exists
sdn: don't fail when adding a duplicate route
2 parents 6bbe411 + 20790d5 commit e5682f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/sdn-cni-plugin/openshift-sdn_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func (p *cniPlugin) CmdAdd(args *skel.CmdArgs) error {
228228
Dst: dst,
229229
Gw: defaultGW,
230230
}
231-
if err := netlink.RouteAdd(route); err != nil {
231+
if err := netlink.RouteAdd(route); err != nil && !os.IsExist(err) {
232232
return fmt.Errorf("failed to add route to dst: %v via SDN: %v", dst, err)
233233
}
234234
}

0 commit comments

Comments
 (0)