summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/providers/fail_over.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/providers/fail_over.c b/src/providers/fail_over.c
index 858d6ba6..0c51b052 100644
--- a/src/providers/fail_over.c
+++ b/src/providers/fail_over.c
@@ -511,7 +511,8 @@ fo_add_srv_server(struct fo_service *service, const char *srv,
if (fo_is_srv_lookup(server)) {
if (((dns_domain == NULL && server->srv_data->dns_domain == NULL) ||
- strcasecmp(server->srv_data->dns_domain, dns_domain) == 0) &&
+ (dns_domain != NULL && server->srv_data->dns_domain != NULL &&
+ strcasecmp(server->srv_data->dns_domain, dns_domain) == 0)) &&
strcasecmp(server->srv_data->proto, proto) == 0) {
return EEXIST;
}