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

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,