Add --dns-loop-detect feature.

This commit is contained in:
Simon Kelley
2014-07-29 16:34:14 +01:00
parent 6d8e8ac0fa
commit b5ea1cc255
12 changed files with 233 additions and 18 deletions

View File

@@ -80,7 +80,9 @@ int main (int argc, char **argv)
sigaction(SIGPIPE, &sigact, NULL);
umask(022); /* known umask, create leases and pid files as 0644 */
rand_init(); /* Must precede read_opts() */
read_opts(argc, argv, compile_opts);
if (daemon->edns_pktsz < PACKETSZ)
@@ -186,7 +188,10 @@ int main (int argc, char **argv)
die(_("authoritative DNS not available: set HAVE_AUTH in src/config.h"), NULL, EC_BADCONF);
#endif
rand_init();
#ifndef HAVE_LOOP
if (option_bool(OPT_LOOP_DETECT))
die(_("Loop detection not available: set HAVE_LOOP in src/config.h"), NULL, EC_BADCONF);
#endif
now = dnsmasq_time();