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 f7b49f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/main/macvlan/macvlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,13 @@ func cmdAdd(args *skel.CmdArgs) error {
}

func cmdDel(args *skel.CmdArgs) error {
n, _, err := loadConf(args, args.Args)
var n NetConf
err := json.Unmarshal(args.StdinData, &n)
if err != nil {
return err
return fmt.Errorf("failed to load netConf: %v", err)
}

isLayer3 := n.IPAM.Type != ""

if isLayer3 {
err = ipam.ExecDel(n.IPAM.Type, args.StdinData)
if err != nil {
Expand Down

0 comments on commit f7b49f7

Please sign in to comment.