Revert "syz-manager: if running on GCE use GCE public IP address"

This reverts commit 273e386b71.
The error handling in the function is somewhat unusual,
and the code was correct. GCE address took precedence.
This commit is contained in:
Dmitry Vyukov 2020-04-19 22:06:23 +02:00
parent 6dfd45e1d0
commit 9f7c6d1294

View File

@ -1178,12 +1178,12 @@ func (mgr *Manager) dashboardReporter() {
func publicWebAddr(addr string) string {
_, port, err := net.SplitHostPort(addr)
if err == nil && port != "" {
if GCE, err := gce.NewContext(); err == nil {
addr = net.JoinHostPort(GCE.ExternalIP, port)
}
if host, err := os.Hostname(); err == nil {
addr = net.JoinHostPort(host, port)
}
if GCE, err := gce.NewContext(); err == nil {
addr = net.JoinHostPort(GCE.ExternalIP, port)
}
}
return "http://" + addr
}