Skip to content

Commit

Permalink
improve macvlan cmdDel: ignore link not found
Browse files Browse the repository at this point in the history
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
  • Loading branch information
cyclinder committed Oct 11, 2023
1 parent f955052 commit a020c4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/main/macvlan/macvlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ func cmdAdd(args *skel.CmdArgs) error {
func cmdDel(args *skel.CmdArgs) error {
n, _, err := loadConf(args, args.Args)
if err != nil {
if _, ok := err.(netlink.LinkNotFoundError); ok {
return nil
}
return err
}

Expand Down

0 comments on commit a020c4e

Please sign in to comment.