summaryrefslogtreecommitdiff
path: root/pkg/specgen/pod_validate.go
diff options
context:
space:
mode:
authorPaul Holzinger <paul.holzinger@web.de>2020-11-24 14:56:35 +0100
committerPaul Holzinger <paul.holzinger@web.de>2021-01-27 17:35:54 +0100
commitc717b3cacad00ec8ea5415a2246994ac3adf7ae0 (patch)
tree5c033b783255244f69db20a208cb25e8dbd94cb5 /pkg/specgen/pod_validate.go
parent2ff4da9b59df27584e436ff59a9d12b2c5e5e410 (diff)
downloadpodman-c717b3cacad00ec8ea5415a2246994ac3adf7ae0.tar.gz
podman-c717b3cacad00ec8ea5415a2246994ac3adf7ae0.tar.bz2
podman-c717b3cacad00ec8ea5415a2246994ac3adf7ae0.zip
Allow static ip and mac with rootless cni network
Make sure we pass the ip and mac address as CNI_ARGS to the cnitool which is executed in the rootless-cni-infra container. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'pkg/specgen/pod_validate.go')
-rw-r--r--pkg/specgen/pod_validate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/specgen/pod_validate.go b/pkg/specgen/pod_validate.go
index 7c81f3f9f..518adb32f 100644
--- a/pkg/specgen/pod_validate.go
+++ b/pkg/specgen/pod_validate.go
@@ -20,7 +20,7 @@ func exclusivePodOptions(opt1, opt2 string) error {
// Validate verifies the input is valid
func (p *PodSpecGenerator) Validate() error {
- if rootless.IsRootless() {
+ if rootless.IsRootless() && len(p.CNINetworks) == 0 {
if p.StaticIP != nil {
return ErrNoStaticIPRootless
}