mirror of
https://github.com/containers/podman.git
synced 2025-06-24 03:08:13 +08:00
Merge pull request #19531 from dfr/freebsd-kube
libpod: fix a crash in 'kube generate' on FreeBSD
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user