summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/providers/ldap/ldap_common.c')
-rw-r--r--src/providers/ldap/ldap_common.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/providers/ldap/ldap_common.c b/src/providers/ldap/ldap_common.c
index ce758755f..c11d036a1 100644
--- a/src/providers/ldap/ldap_common.c
+++ b/src/providers/ldap/ldap_common.c
@@ -1185,6 +1185,13 @@ errno_t sdap_urls_init(struct be_ctx *ctx,
talloc_steal(service, list[i]);
+ /* It could be ipv6 address in square brackets. Remove
+ * the brackets if needed. */
+ ret = remove_ipv6_brackets(lud->lud_host);
+ if (ret != EOK) {
+ goto done;
+ }
+
ret = be_fo_add_server(ctx, service->name, lud->lud_host,
lud->lud_port, list[i], primary);
ldap_free_urldesc(lud);