提交 21206402 编写于 作者: A Anders F Björklund

Check that the ssh-ip-address is a valid IP

上级 f94cb815
......@@ -1102,6 +1102,13 @@ func validateFlags(cmd *cobra.Command, drvName string) {
if sshIPAddress == "" {
exit.Message(reason.Usage, "No IP address provided. Try specifying --ssh-ip-address, or see https://minikube.sigs.k8s.io/docs/drivers/ssh/")
}
if net.ParseIP(sshIPAddress) == nil {
_, err := net.LookupIP(sshIPAddress)
if err != nil {
exit.Error(reason.Usage, "Could not resolve IP address", err)
}
}
}
// validate kubeadm extra args
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册