diff --git a/etcd-manager/cmd/etcd-manager/main.go b/etcd-manager/cmd/etcd-manager/main.go index 9c789c321..dd5396bdf 100644 --- a/etcd-manager/cmd/etcd-manager/main.go +++ b/etcd-manager/cmd/etcd-manager/main.go @@ -207,16 +207,16 @@ func RunEtcdManager(o *EtcdManagerOptions) error { return fmt.Errorf("backup-store is required") } - var err error var networkCIDR *net.IPNet if o.NetworkCIDR != "" { if o.VolumeProviderID != "openstack" { return fmt.Errorf("network-cidr is only supported with provider 'openstack'") } + var err error _, networkCIDR, err = net.ParseCIDR(o.NetworkCIDR) if err != nil { - return fmt.Errorf("network-cidr %s", err) + return fmt.Errorf("parsing network-cidr: %w", err) } }