Merge pull request #509 from aojea/portmapDel

portmap should not perform deletions if not portMapping config received
This commit is contained in:
Bryan Boreham 2020-07-15 16:24:35 +01:00 committed by GitHub
commit 6eb8e31d21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,6 +107,10 @@ func cmdDel(args *skel.CmdArgs) error {
return fmt.Errorf("failed to parse config: %v", err)
}
if len(netConf.RuntimeConfig.PortMaps) == 0 {
return nil
}
netConf.ContainerID = args.ContainerID
// We don't need to parse out whether or not we're using v6 or snat,