Merge pull request #1248 from mavenugo/addr
Resolve host-name before trying the interface-name in agent bind
This commit is contained in:
commit
08014eadb6
|
@ -69,8 +69,12 @@ func resolveAddr(addrOrInterface string) (string, error) {
|
||||||
return addrOrInterface, nil
|
return addrOrInterface, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addr, err := net.ResolveIPAddr("ip", addrOrInterface)
|
||||||
|
if err != nil {
|
||||||
// If not a valid IP address, it should be a valid interface
|
// If not a valid IP address, it should be a valid interface
|
||||||
return getBindAddr(addrOrInterface)
|
return getBindAddr(addrOrInterface)
|
||||||
|
}
|
||||||
|
return addr.String(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *controller) handleKeyChange(keys []*types.EncryptionKey) error {
|
func (c *controller) handleKeyChange(keys []*types.EncryptionKey) error {
|
||||||
|
|
Loading…
Reference in New Issue