summaryrefslogtreecommitdiffstats
path: root/ipa-client/ipa-install/ipa-client-install
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-client/ipa-install/ipa-client-install')
-rwxr-xr-xipa-client/ipa-install/ipa-client-install9
1 files changed, 7 insertions, 2 deletions
diff --git a/ipa-client/ipa-install/ipa-client-install b/ipa-client/ipa-install/ipa-client-install
index 65f3d1321..6aca5d240 100755
--- a/ipa-client/ipa-install/ipa-client-install
+++ b/ipa-client/ipa-install/ipa-client-install
@@ -648,8 +648,13 @@ def resolve_ipaddress(server):
"""
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP)
- s.connect((server, 389))
- addr, port = s.getsockname()
+ try:
+ s.connect((server, 389))
+ addr, port = s.getsockname()
+ except socket.gaierror:
+ s = socket.socket(socket.AF_INET6, socket.SOCK_STREAM, socket.IPPROTO_TCP)
+ s.connect((server, 389))
+ addr, port, foo, bar = s.getsockname()
s.close()
return addr