mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-20 02:38:32 +00:00
Fix --address=/#/...... which was lost in 2.86
A victim of the domain-search rewrite. Apologies.
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
version 2.87
|
||||||
|
Allow arbitrary prefix lengths in --rev-server and
|
||||||
|
--domain=....,local
|
||||||
|
|
||||||
|
Replace --address=/#/..... functionality which got
|
||||||
|
missed in the 2.86 domain search rewrite.
|
||||||
|
|
||||||
|
|
||||||
version 2.86
|
version 2.86
|
||||||
Handle DHCPREBIND requests in the DHCPv6 server code.
|
Handle DHCPREBIND requests in the DHCPv6 server code.
|
||||||
Thanks to Aichun Li for spotting this omission, and the initial
|
Thanks to Aichun Li for spotting this omission, and the initial
|
||||||
|
|||||||
@@ -1626,7 +1626,8 @@ void check_servers(int no_loop_check)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ((serv->flags & SERV_LITERAL_ADDRESS) &&
|
if ((serv->flags & SERV_LITERAL_ADDRESS) &&
|
||||||
!(serv->flags & (SERV_6ADDR | SERV_4ADDR | SERV_ALL_ZEROS)))
|
!(serv->flags & (SERV_6ADDR | SERV_4ADDR | SERV_ALL_ZEROS)) &&
|
||||||
|
strlen(serv->domain))
|
||||||
{
|
{
|
||||||
count--;
|
count--;
|
||||||
if (++locals <= LOCALS_LOGGED)
|
if (++locals <= LOCALS_LOGGED)
|
||||||
|
|||||||
17
src/option.c
17
src/option.c
@@ -2764,7 +2764,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
|
|
||||||
if (!arg || !*arg)
|
if (!arg || !*arg)
|
||||||
flags = SERV_LITERAL_ADDRESS;
|
flags = SERV_LITERAL_ADDRESS;
|
||||||
else if (option == 'A')
|
else if (option != 'S')
|
||||||
{
|
{
|
||||||
/* # as literal address means return zero address for 4 and 6 */
|
/* # as literal address means return zero address for 4 and 6 */
|
||||||
if (strcmp(arg, "#") == 0)
|
if (strcmp(arg, "#") == 0)
|
||||||
@@ -2788,11 +2788,18 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
/* server=//1.2.3.4 is special. */
|
/* server=//1.2.3.4 is special. */
|
||||||
if (strlen(domain) == 0 && lastdomain)
|
if (lastdomain)
|
||||||
flags |= SERV_FOR_NODOTS;
|
{
|
||||||
else
|
if (strlen(domain) == 0)
|
||||||
flags &= ~SERV_FOR_NODOTS;
|
flags |= SERV_FOR_NODOTS;
|
||||||
|
else
|
||||||
|
flags &= ~SERV_FOR_NODOTS;
|
||||||
|
|
||||||
|
/* address=/#/ matches the same as without domain */
|
||||||
|
if (option != 'S' && domain[0] == '#' && domain[1] == 0)
|
||||||
|
domain[0] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!add_update_server(flags, &serv_addr, &source_addr, interface, domain, &addr))
|
if (!add_update_server(flags, &serv_addr, &source_addr, interface, domain, &addr))
|
||||||
ret_err(gen_err);
|
ret_err(gen_err);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user