mirror of
https://github.com/containers/podman.git
synced 2025-10-17 19:24:04 +08:00
Fix parsing of --network for podman pod create
Interpreting CNI networks was a bit broken, and it was causing rootless `podman pod create` to fail. Also, we were missing the `--net` alias for `--network`, so add that. Fixes #6119 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -33,7 +33,7 @@ func (p *PodSpecGenerator) Validate() error {
|
||||
}
|
||||
|
||||
// PodNetworkConfig
|
||||
if err := p.NetNS.validate(); err != nil {
|
||||
if err := validateNetNS(&p.NetNS); err != nil {
|
||||
return err
|
||||
}
|
||||
if p.NoInfra {
|
||||
@ -85,10 +85,6 @@ func (p *PodSpecGenerator) Validate() error {
|
||||
return exclusivePodOptions("NoManageHosts", "HostAdd")
|
||||
}
|
||||
|
||||
if err := p.NetNS.validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Set Defaults
|
||||
if p.NetNS.Value == "" {
|
||||
if rootless.IsRootless() {
|
||||
|
Reference in New Issue
Block a user