diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-11-07 20:26:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-07 20:26:14 +0100 |
commit | d919961f621d0b9eb70b971fc8e8915ee279ab60 (patch) | |
tree | 05272b838219ba06a56c4d06038ae2f7d6fa1fe1 /libpod/container.go | |
parent | 347499778cb1a7045dc831f99b9539bc20fe008d (diff) | |
parent | 82e4116e578f72bd627330ac10d541c3e234738c (diff) | |
download | podman-d919961f621d0b9eb70b971fc8e8915ee279ab60.tar.gz podman-d919961f621d0b9eb70b971fc8e8915ee279ab60.tar.bz2 podman-d919961f621d0b9eb70b971fc8e8915ee279ab60.zip |
Merge pull request #4451 from giuseppe/set-mac
podman: add support for specifying MAC
Diffstat (limited to 'libpod/container.go')
-rw-r--r-- | libpod/container.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/container.go b/libpod/container.go index 8e24391b9..4f7fc067e 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -138,6 +138,10 @@ type Container struct { // being checkpointed. If requestedIP is set it will be used instead // of config.StaticIP. requestedIP net.IP + // A restored container should have the same MAC address as before + // being checkpointed. If requestedMAC is set it will be used instead + // of config.StaticMAC. + requestedMAC net.HardwareAddr // This is true if a container is restored from a checkpoint. restoreFromCheckpoint bool @@ -296,6 +300,10 @@ type ContainerConfig struct { // This cannot be set unless CreateNetNS is set. // If not set, the container will be dynamically assigned an IP by CNI. StaticIP net.IP `json:"staticIP"` + // StaticMAC is a static MAC to request for the container. + // This cannot be set unless CreateNetNS is set. + // If not set, the container will be dynamically assigned a MAC by CNI. + StaticMAC net.HardwareAddr `json:"staticMAC"` // PortMappings are the ports forwarded to the container's network // namespace // These are not used unless CreateNetNS is true |