Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set lookup_family_order = ipv6_first on IPv6-only clients #4455

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 18 additions & 0 deletions ipaclient/install/client.py
Expand Up @@ -956,6 +956,24 @@ def configure_sssd_conf(
nss_service.set_option('memcache_timeout', 600)
sssdconfig.save_service(nss_service)

family_order = None
try:
iface = get_server_connection_interface(cli_server[0])
except RuntimeError as e:
logger.error("Cannot determine interface used to connect to "
"IPA. %s", e)
else:
try:
connect_ips = get_local_ipaddresses(iface)
except CalledProcessError as e:
logger.error("Cannot determine IP(s) used to connect to "
"IPA. %s", e)
else:
if all([ip.version == 6 for ip in connect_ips]):
family_order = 'ipv6_first'
if family_order:
domain.set_option('lookup_family_order', family_order)

domain.set_option('ipa_domain', cli_domain)
domain.set_option('ipa_hostname', client_hostname)
if cli_domain.lower() != cli_realm.lower():
Expand Down