embed: reject binding listeners to domain names

Fixes #6336
This commit is contained in:
Anthony Romano
2017-01-25 19:23:10 -08:00
parent 63572567b4
commit 5a67b0aba6

View File

@@ -405,8 +405,7 @@ func checkBindURLs(urls []url.URL) error {
continue
}
if net.ParseIP(host) == nil {
err := fmt.Errorf("expected IP in URL for binding (%s)", url.String())
plog.Warning(err)
return fmt.Errorf("expected IP in URL for binding (%s)", url.String())
}
}
return nil