mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Resolve host-name before trying the interface-name in agent bind
Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
parent
15ee7ae763
commit
64d8c5f87f
1 changed files with 6 additions and 2 deletions
|
@ -69,8 +69,12 @@ func resolveAddr(addrOrInterface string) (string, error) {
|
|||
return addrOrInterface, nil
|
||||
}
|
||||
|
||||
// If not a valid IP address, it should be a valid interface
|
||||
return getBindAddr(addrOrInterface)
|
||||
addr, err := net.ResolveIPAddr("ip", addrOrInterface)
|
||||
if err != nil {
|
||||
// If not a valid IP address, it should be a valid interface
|
||||
return getBindAddr(addrOrInterface)
|
||||
}
|
||||
return addr.String(), nil
|
||||
}
|
||||
|
||||
func (c *controller) handleKeyChange(keys []*types.EncryptionKey) error {
|
||||
|
|
Loading…
Reference in a new issue