Make --server=/#/<addr> behave the same as --server=<addr>
authorSimon Kelley <simon@thekelleys.org.uk>
Wed, 5 Apr 2023 16:29:04 +0000 (17:29 +0100)
committerSimon Kelley <simon@thekelleys.org.uk>
Wed, 5 Apr 2023 16:29:04 +0000 (17:29 +0100)
For consistency with --address and older dnsmasq releases.

src/option.c

index 588a558..146ca0c 100644 (file)
@@ -3058,8 +3058,8 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
                    else
                      flags &= ~SERV_FOR_NODOTS;
                    
-                   /* address=/#/ matches the same as without domain */
-                   if (option == 'A' && cur_domain[0] == '#' && cur_domain[1] == 0)
+                   /* address=/#/ matches the same as without domain, as does server=/#/.... for consistency. */
+                   if (cur_domain[0] == '#' && cur_domain[1] == 0)
                      cur_domain[0] = 0;
                  }