Commit 3ad3f3bb authored by Simon Kelley's avatar Simon Kelley

Fix breakage of --domain=<domain>,<subnet>,local

parent ad946d55
...@@ -10,6 +10,10 @@ version 2.73 ...@@ -10,6 +10,10 @@ version 2.73
Use inotify for checking on updates to /etc/resolv.conf and Use inotify for checking on updates to /etc/resolv.conf and
friends under Linux. This fixes race conditions when the files are friends under Linux. This fixes race conditions when the files are
updated rapidly and saves CPU by noy polling. updated rapidly and saves CPU by noy polling.
Fix breakage of --domain=<domain>,<subnet>,local - only reverse
queries were intercepted. THis appears to have been broken
since 2.69. Thanks to Josh Stone for finding the bug.
version 2.72 version 2.72
......
...@@ -1941,10 +1941,17 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma ...@@ -1941,10 +1941,17 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
else else
{ {
/* generate the equivalent of /* generate the equivalent of
local=/<domain>/
local=/xxx.yyy.zzz.in-addr.arpa/ */ local=/xxx.yyy.zzz.in-addr.arpa/ */
struct server *serv = add_rev4(new->start, msize); struct server *serv = add_rev4(new->start, msize);
serv->flags |= SERV_NO_ADDR; serv->flags |= SERV_NO_ADDR;
/* local=/<domain>/ */
serv = opt_malloc(sizeof(struct server));
memset(serv, 0, sizeof(struct server));
serv->domain = d;
serv->flags = SERV_HAS_DOMAIN | SERV_NO_ADDR;
serv->next = daemon->servers;
daemon->servers = serv;
} }
} }
} }
...@@ -1978,10 +1985,17 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma ...@@ -1978,10 +1985,17 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
else else
{ {
/* generate the equivalent of /* generate the equivalent of
local=/<domain>/
local=/xxx.yyy.zzz.ip6.arpa/ */ local=/xxx.yyy.zzz.ip6.arpa/ */
struct server *serv = add_rev6(&new->start6, msize); struct server *serv = add_rev6(&new->start6, msize);
serv->flags |= SERV_NO_ADDR; serv->flags |= SERV_NO_ADDR;
/* local=/<domain>/ */
serv = opt_malloc(sizeof(struct server));
memset(serv, 0, sizeof(struct server));
serv->domain = d;
serv->flags = SERV_HAS_DOMAIN | SERV_NO_ADDR;
serv->next = daemon->servers;
daemon->servers = serv;
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment