Hi Simon, thanks, but actually, not that much. Sorry I was busy in different projects.
This change now broken my configuration, because this no longer accepts the same combination of parameters without fatal error. Could it be made as warning instead? It do not think it should be fatal, soa is initialized to good enough value, contact and primary server are not mandatory for normal operation. Patch changing it to warning included. On 3/7/19 6:12 PM, Simon Kelley wrote: > On 15/02/2019 12:09, Petr Mensik wrote: >> Hi! >> >> I was playing a bit with auth-vm and auth-server together with virtual >> machine manager. I think it might be useful to omit interface in >> auth-server at all, just change name reported by auth-vm zones on normal >> dns port. >> >> Libvirt uses dnsmasq as DHCP and DNS server on each virtual network >> configured. It listens just on one interface excluding loopback (virbr0 >> for example). If I specify its interface, it stops responding normal >> recursive queries on it. I think there is no good reason to demand it. >> Anyway, current manual page indicates it is optional... >> >> Regards, >> Petr >> > > It was made optional in this commit. > > http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=08933475abd0580cff747e3d1e0db3865207a200 > > > Does that adddress the use-case you describe? > > > Cheers, > > Simon. > > > _______________________________________________ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > -- Petr Menšík Software Engineer Red Hat, http://www.redhat.com/ email: pemen...@redhat.com PGP: 65C6C973
From 24ff470a21741ccea8dc5747f7d11454fb9f4851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemen...@redhat.com> Date: Fri, 12 Apr 2019 16:14:15 +0200 Subject: [PATCH] Accept auth-zone without auth-server Do not fail hard if auth-zone is provided but auth-zone is not. It is recommended and prints just warning now, but can still work without it. --- src/dnsmasq.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/dnsmasq.c b/src/dnsmasq.c index e6140b7..704475f 100644 --- a/src/dnsmasq.c +++ b/src/dnsmasq.c @@ -218,11 +218,6 @@ int main (int argc, char **argv) die(_("asynchronous logging is not available under Android"), NULL, EC_BADCONF); #endif -#ifndef HAVE_AUTH - if (daemon->auth_zones) - die(_("authoritative DNS not available: set HAVE_AUTH in src/config.h"), NULL, EC_BADCONF); -#endif - #ifndef HAVE_LOOP if (option_bool(OPT_LOOP_DETECT)) die(_("loop detection not available: set HAVE_LOOP in src/config.h"), NULL, EC_BADCONF); @@ -233,16 +228,13 @@ int main (int argc, char **argv) die(_("Ubus not available: set HAVE_UBUS in src/config.h"), NULL, EC_BADCONF); #endif - if (daemon->max_port < daemon->min_port) - die(_("max_port cannot be smaller than min_port"), NULL, EC_BADCONF); - now = dnsmasq_time(); if (daemon->auth_zones) { - if (!daemon->authserver) - die(_("--auth-server required when an auth zone is defined."), NULL, EC_BADCONF); - +#ifndef HAVE_AUTH + die(_("authoritative DNS not available: set HAVE_AUTH in src/config.h"), NULL, EC_BADCONF); +#else /* Create a serial at startup if not configured. */ #ifdef HAVE_BROKEN_RTC if (daemon->soa_sn == 0) @@ -250,9 +242,13 @@ int main (int argc, char **argv) #else if (daemon->soa_sn == 0) daemon->soa_sn = now; +#endif #endif } - + + if (daemon->max_port < daemon->min_port) + die(_("max_port cannot be smaller than min_port"), NULL, EC_BADCONF); + #ifdef HAVE_DHCP6 if (daemon->dhcp6) { @@ -864,6 +860,11 @@ int main (int argc, char **argv) } #endif +#ifdef HAVE_AUTH + if (daemon->auth_zones &&!daemon->authserver) + my_syslog(LOG_WARNING, _("--auth-server recommended when an auth zone is defined.")); +#endif + if (log_err != 0) my_syslog(LOG_WARNING, _("warning: failed to change owner of %s: %s"), daemon->log_file, strerror(log_err)); -- 2.20.1
_______________________________________________ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss