mirror of https://github.com/containers/podman.git
Merge pull request #19531 from dfr/freebsd-kube
libpod: fix a crash in 'kube generate' on FreeBSD
This commit is contained in:
commit
e9a3b7cfa1
|
@ -1210,9 +1210,11 @@ func (c *Container) HostNetwork() bool {
|
||||||
if c.config.CreateNetNS || c.config.NetNsCtr != "" {
|
if c.config.CreateNetNS || c.config.NetNsCtr != "" {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for _, ns := range c.config.Spec.Linux.Namespaces {
|
if c.config.Spec.Linux != nil {
|
||||||
if ns.Type == spec.NetworkNamespace {
|
for _, ns := range c.config.Spec.Linux.Namespaces {
|
||||||
return false
|
if ns.Type == spec.NetworkNamespace {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue