Skip to content

Commit

Permalink
Merge pull request #2237 from pi-hole/fix/revServer_wo_domain
Browse files Browse the repository at this point in the history
Make <domain> in revServer *really* optional
  • Loading branch information
PromoFaux authored Feb 21, 2025
2 parents b3af79f + cb43c6e commit bdbe30a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/config/dnsmasq_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ bool __attribute__((const)) write_dnsmasq_config(struct config *conf, bool test_
continue;
}

if(active == NULL || cidr == NULL || target == NULL || domain == NULL)
if(active == NULL || cidr == NULL || target == NULL)
{
log_err("Skipped invalid dns.revServers[%u]: %s", i, revServer->valuestring);
log_err("Skipped invalid dns.revServers[%u]: %s (not fully defined)", i, revServer->valuestring);
free(copy);
continue;
}
Expand All @@ -517,7 +517,7 @@ bool __attribute__((const)) write_dnsmasq_config(struct config *conf, bool test_

// If we have a reverse domain, we forward all queries to this domain to
// the same destination
if(strlen(domain) > 0)
if(domain != NULL && strlen(domain) > 0)
{
fprintf(pihole_conf, "server=/%s/%s\n", domain, target);

Expand Down

0 comments on commit bdbe30a

Please sign in to comment.