agent: unix sockets are not ip addrs

pull/3332/head
Frank Schroeder 2017-07-28 14:53:21 +02:00
parent 2fcdb35cbb
commit ac9602e798
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 4 additions and 0 deletions

View File

@ -2137,6 +2137,10 @@ func (c *Config) ResolveTmplAddrs() (err error) {
err = fmt.Errorf("Resolution of %s failed: %v", name, err) err = fmt.Errorf("Resolution of %s failed: %v", name, err)
return return
} }
if strings.HasPrefix(ip, "unix://") {
*addr = ip
return
}
if net.ParseIP(ip) == nil { if net.ParseIP(ip) == nil {
err = fmt.Errorf("Failed to parse %s: %v", name, ip) err = fmt.Errorf("Failed to parse %s: %v", name, ip)
return return