mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-19 19:51:01 +00:00
Compare commits
8
Commits
v2.88
...
v2.89test1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5e8cae1ca | ||
|
|
7f42ca8af8 | ||
|
|
e4251eb13b | ||
|
|
5083876910 | ||
|
|
f172fdbb77 | ||
|
|
3822825e54 | ||
|
|
1da54210fc | ||
|
|
43a2a66531 |
No files matched your search
@@ -1,3 +1,17 @@
|
|||||||
|
version 2.89
|
||||||
|
Fix bug introduced in 2.88 (commit fe91134b) which can result
|
||||||
|
in corruption of the DNS cache internal data structures and
|
||||||
|
logging of "cache internal error". This has only been seen
|
||||||
|
in one place in the wild, and it took considerable effort
|
||||||
|
to even generate a test case to reproduce it, but there's
|
||||||
|
no way to be sure it won't strike, and the effect is to break
|
||||||
|
the cache badly. Installations with DNSSEC enabled are more
|
||||||
|
likely to see the problem, but not running DNSSEC does not
|
||||||
|
guarantee that it won't happen. Thanks to Timo van Roermund
|
||||||
|
for reporting the bug and for his great efforts in chasing
|
||||||
|
it down.
|
||||||
|
|
||||||
|
|
||||||
version 2.88
|
version 2.88
|
||||||
Fix bug in --dynamic-host when an interface has /16 IPv4
|
Fix bug in --dynamic-host when an interface has /16 IPv4
|
||||||
address. Thanks to Mark Dietzer for spotting this.
|
address. Thanks to Mark Dietzer for spotting this.
|
||||||
@@ -18,6 +32,12 @@ version 2.88
|
|||||||
flushed when its TTL expires, so the cache becomes
|
flushed when its TTL expires, so the cache becomes
|
||||||
strictly least-recently-used.
|
strictly least-recently-used.
|
||||||
|
|
||||||
|
Add --port-limit option which allows tuning for robustness in
|
||||||
|
the face of some upstream network errors. Thanks to
|
||||||
|
Prashant Kumar Singh, Ravi Nagayach and Mike Danilov,
|
||||||
|
all of Amazon Web Services, for their efforts in developing this
|
||||||
|
and the stale-cache and fast-retry options.
|
||||||
|
|
||||||
Make --hostsdir (but NOT --dhcp-hostsdir and --dhcp-optsdir)
|
Make --hostsdir (but NOT --dhcp-hostsdir and --dhcp-optsdir)
|
||||||
handle removal of whole files or entries within files.
|
handle removal of whole files or entries within files.
|
||||||
Thanks to Dominik Derigs for the initial patches for this.
|
Thanks to Dominik Derigs for the initial patches for this.
|
||||||
|
|||||||
Vendored
+6
@@ -1,3 +1,9 @@
|
|||||||
|
dnsmasq (2.89-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New upstream.
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Fri, 13 Jan 2023 21:57:01 +0000
|
||||||
|
|
||||||
dnsmasq (2.88-1) unstable; urgency=low
|
dnsmasq (2.88-1) unstable; urgency=low
|
||||||
|
|
||||||
* New upstream.
|
* New upstream.
|
||||||
|
|||||||
+14
-9
@@ -2215,6 +2215,20 @@ exit 0
|
|||||||
|
|
||||||
and /share/ads-domains.gz containing a compressed
|
and /share/ads-domains.gz containing a compressed
|
||||||
list of ad server domains will save disk space with large ad-server blocklists.
|
list of ad server domains will save disk space with large ad-server blocklists.
|
||||||
|
.TP
|
||||||
|
.B --no-ident
|
||||||
|
Do not respond to class CHAOS and type TXT in domain bind queries.
|
||||||
|
|
||||||
|
Without this option being set, the cache statistics are also available in the
|
||||||
|
DNS as answers to queries of class CHAOS and type TXT in domain bind. The domain
|
||||||
|
names are cachesize.bind, insertions.bind, evictions.bind, misses.bind,
|
||||||
|
hits.bind, auth.bind and servers.bind unless disabled at compile-time. An
|
||||||
|
example command to query this, using the
|
||||||
|
.B dig
|
||||||
|
utility would be
|
||||||
|
|
||||||
|
dig +short chaos txt cachesize.bind
|
||||||
|
|
||||||
.SH CONFIG FILE
|
.SH CONFIG FILE
|
||||||
At startup, dnsmasq reads
|
At startup, dnsmasq reads
|
||||||
.I /etc/dnsmasq.conf,
|
.I /etc/dnsmasq.conf,
|
||||||
@@ -2264,15 +2278,6 @@ resulted in an error. In
|
|||||||
mode or when full logging is enabled (\fB--log-queries\fP), a complete dump of the
|
mode or when full logging is enabled (\fB--log-queries\fP), a complete dump of the
|
||||||
contents of the cache is made.
|
contents of the cache is made.
|
||||||
|
|
||||||
The cache statistics are also available in the DNS as answers to
|
|
||||||
queries of class CHAOS and type TXT in domain bind. The domain names are cachesize.bind, insertions.bind, evictions.bind,
|
|
||||||
misses.bind, hits.bind, auth.bind and servers.bind. An example command to query this, using the
|
|
||||||
.B dig
|
|
||||||
utility would be
|
|
||||||
|
|
||||||
dig +short chaos txt cachesize.bind
|
|
||||||
|
|
||||||
.PP
|
|
||||||
When it receives SIGUSR2 and it is logging direct to a file (see
|
When it receives SIGUSR2 and it is logging direct to a file (see
|
||||||
.B --log-facility
|
.B --log-facility
|
||||||
)
|
)
|
||||||
|
|||||||
+80
-67
@@ -28,6 +28,7 @@ static int bignames_left, hash_size;
|
|||||||
static void make_non_terminals(struct crec *source);
|
static void make_non_terminals(struct crec *source);
|
||||||
static struct crec *really_insert(char *name, union all_addr *addr, unsigned short class,
|
static struct crec *really_insert(char *name, union all_addr *addr, unsigned short class,
|
||||||
time_t now, unsigned long ttl, unsigned int flags);
|
time_t now, unsigned long ttl, unsigned int flags);
|
||||||
|
static void dump_cache_entry(struct crec *cache, time_t now);
|
||||||
|
|
||||||
/* type->string mapping: this is also used by the name-hash function as a mixing table. */
|
/* type->string mapping: this is also used by the name-hash function as a mixing table. */
|
||||||
/* taken from https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml */
|
/* taken from https://www.iana.org/assignments/dns-parameters/dns-parameters.xhtml */
|
||||||
@@ -235,19 +236,23 @@ static void cache_hash(struct crec *crecp)
|
|||||||
|
|
||||||
char *name = cache_get_name(crecp);
|
char *name = cache_get_name(crecp);
|
||||||
struct crec **up = hash_bucket(name);
|
struct crec **up = hash_bucket(name);
|
||||||
|
unsigned int flags = crecp->flags & (F_IMMORTAL | F_REVERSE);
|
||||||
|
|
||||||
if (!(crecp->flags & F_REVERSE))
|
if (!(flags & F_REVERSE))
|
||||||
{
|
{
|
||||||
while (*up && ((*up)->flags & F_REVERSE))
|
while (*up && ((*up)->flags & F_REVERSE))
|
||||||
up = &((*up)->hash_next);
|
up = &((*up)->hash_next);
|
||||||
|
|
||||||
if (crecp->flags & F_IMMORTAL)
|
if (flags & F_IMMORTAL)
|
||||||
while (*up && !((*up)->flags & F_IMMORTAL))
|
while (*up && !((*up)->flags & F_IMMORTAL))
|
||||||
up = &((*up)->hash_next);
|
up = &((*up)->hash_next);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Preserve order when inserting the same name multiple times. */
|
/* Preserve order when inserting the same name multiple times.
|
||||||
while (*up && hostname_isequal(cache_get_name(*up), name))
|
Do not mess up the flag invariants. */
|
||||||
|
while (*up &&
|
||||||
|
hostname_isequal(cache_get_name(*up), name) &&
|
||||||
|
flags == ((*up)->flags & (F_IMMORTAL | F_REVERSE)))
|
||||||
up = &((*up)->hash_next);
|
up = &((*up)->hash_next);
|
||||||
|
|
||||||
crecp->hash_next = *up;
|
crecp->hash_next = *up;
|
||||||
@@ -594,7 +599,7 @@ static struct crec *really_insert(char *name, union all_addr *addr, unsigned sho
|
|||||||
struct crec *new, *target_crec = NULL;
|
struct crec *new, *target_crec = NULL;
|
||||||
union bigname *big_name = NULL;
|
union bigname *big_name = NULL;
|
||||||
int freed_all = (flags & F_REVERSE);
|
int freed_all = (flags & F_REVERSE);
|
||||||
int free_avail = 0;
|
struct crec *free_avail = NULL;
|
||||||
unsigned int target_uid;
|
unsigned int target_uid;
|
||||||
|
|
||||||
/* if previous insertion failed give up now. */
|
/* if previous insertion failed give up now. */
|
||||||
@@ -653,13 +658,10 @@ static struct crec *really_insert(char *name, union all_addr *addr, unsigned sho
|
|||||||
a tight loop here. If that happens, abandon the
|
a tight loop here. If that happens, abandon the
|
||||||
insert. Once in this state, all inserts will probably fail. */
|
insert. Once in this state, all inserts will probably fail. */
|
||||||
if (free_avail)
|
if (free_avail)
|
||||||
{
|
|
||||||
static int warned = 0;
|
|
||||||
if (!warned)
|
|
||||||
{
|
{
|
||||||
my_syslog(LOG_ERR, _("Internal error in cache."));
|
my_syslog(LOG_ERR, _("Internal error in cache."));
|
||||||
warned = 1;
|
/* Log the entry we tried to delete. */
|
||||||
}
|
dump_cache_entry(free_avail, now);
|
||||||
insert_error = 1;
|
insert_error = 1;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -667,7 +669,7 @@ static struct crec *really_insert(char *name, union all_addr *addr, unsigned sho
|
|||||||
if (freed_all)
|
if (freed_all)
|
||||||
{
|
{
|
||||||
/* For DNSSEC records, uid holds class. */
|
/* For DNSSEC records, uid holds class. */
|
||||||
free_avail = 1; /* Must be free space now. */
|
free_avail = new; /* Must be free space now. */
|
||||||
|
|
||||||
/* condition valid when stale-caching */
|
/* condition valid when stale-caching */
|
||||||
if (difftime(now, new->ttd) < 0)
|
if (difftime(now, new->ttd) < 0)
|
||||||
@@ -1080,7 +1082,6 @@ static void add_hosts_entry(struct crec *cache, union all_addr *addr, int addrle
|
|||||||
the array rhash, hashed on address. Note that rhash and the values
|
the array rhash, hashed on address. Note that rhash and the values
|
||||||
in ->next are only valid whilst reading hosts files: the buckets are
|
in ->next are only valid whilst reading hosts files: the buckets are
|
||||||
then freed, and the ->next pointer used for other things.
|
then freed, and the ->next pointer used for other things.
|
||||||
|
|
||||||
Only insert each unique address once into this hashing structure.
|
Only insert each unique address once into this hashing structure.
|
||||||
|
|
||||||
This complexity avoids O(n^2) divergent CPU use whilst reading
|
This complexity avoids O(n^2) divergent CPU use whilst reading
|
||||||
@@ -1760,63 +1761,20 @@ static char *sanitise(char *name)
|
|||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void dump_cache_entry(struct crec *cache, time_t now)
|
||||||
void dump_cache(time_t now)
|
|
||||||
{
|
{
|
||||||
struct server *serv, *serv1;
|
(void)now;
|
||||||
|
static char *buff = NULL;
|
||||||
|
|
||||||
my_syslog(LOG_INFO, _("time %lu"), (unsigned long)now);
|
char *p, *t = " ";
|
||||||
my_syslog(LOG_INFO, _("cache size %d, %d/%d cache insertions re-used unexpired cache entries."),
|
char *a = daemon->addrbuff, *n = cache_get_name(cache);
|
||||||
daemon->cachesize, daemon->metrics[METRIC_DNS_CACHE_LIVE_FREED], daemon->metrics[METRIC_DNS_CACHE_INSERTED]);
|
|
||||||
my_syslog(LOG_INFO, _("queries forwarded %u, queries answered locally %u"),
|
|
||||||
daemon->metrics[METRIC_DNS_QUERIES_FORWARDED], daemon->metrics[METRIC_DNS_LOCAL_ANSWERED]);
|
|
||||||
if (daemon->cache_max_expiry != 0)
|
|
||||||
my_syslog(LOG_INFO, _("queries answered from stale cache %u"), daemon->metrics[METRIC_DNS_STALE_ANSWERED]);
|
|
||||||
#ifdef HAVE_AUTH
|
|
||||||
my_syslog(LOG_INFO, _("queries for authoritative zones %u"), daemon->metrics[METRIC_DNS_AUTH_ANSWERED]);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
blockdata_report();
|
/* String length is limited below */
|
||||||
|
if (!buff && !(buff = whine_malloc(150)))
|
||||||
|
return;
|
||||||
|
|
||||||
/* sum counts from different records for same server */
|
p = buff;
|
||||||
for (serv = daemon->servers; serv; serv = serv->next)
|
|
||||||
serv->flags &= ~SERV_MARK;
|
|
||||||
|
|
||||||
for (serv = daemon->servers; serv; serv = serv->next)
|
|
||||||
if (!(serv->flags & SERV_MARK))
|
|
||||||
{
|
|
||||||
int port;
|
|
||||||
unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
|
|
||||||
unsigned int sigma_latency = 0, count_latency = 0;
|
|
||||||
|
|
||||||
for (serv1 = serv; serv1; serv1 = serv1->next)
|
|
||||||
if (!(serv1->flags & SERV_MARK) && sockaddr_isequal(&serv->addr, &serv1->addr))
|
|
||||||
{
|
|
||||||
serv1->flags |= SERV_MARK;
|
|
||||||
queries += serv1->queries;
|
|
||||||
failed_queries += serv1->failed_queries;
|
|
||||||
nxdomain_replies += serv1->nxdomain_replies;
|
|
||||||
retrys += serv1->retrys;
|
|
||||||
sigma_latency += serv1->query_latency;
|
|
||||||
count_latency++;
|
|
||||||
}
|
|
||||||
port = prettyprint_addr(&serv->addr, daemon->addrbuff);
|
|
||||||
my_syslog(LOG_INFO, _("server %s#%d: queries sent %u, retried %u, failed %u, nxdomain replies %u, avg. latency %ums"),
|
|
||||||
daemon->addrbuff, port, queries, retrys, failed_queries, nxdomain_replies, sigma_latency/count_latency);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (option_bool(OPT_DEBUG) || option_bool(OPT_LOG))
|
|
||||||
{
|
|
||||||
struct crec *cache ;
|
|
||||||
int i;
|
|
||||||
my_syslog(LOG_INFO, "Host Address Flags Expires Source");
|
|
||||||
my_syslog(LOG_INFO, "------------------------------ ---------------------------------------- ---------- ------------------------ ------------");
|
|
||||||
|
|
||||||
for (i=0; i<hash_size; i++)
|
|
||||||
for (cache = hash_table[i]; cache; cache = cache->hash_next)
|
|
||||||
{
|
|
||||||
char *t = " ";
|
|
||||||
char *a = daemon->addrbuff, *p = daemon->namebuff, *n = cache_get_name(cache);
|
|
||||||
*a = 0;
|
*a = 0;
|
||||||
if (strlen(n) == 0 && !(cache->flags & F_REVERSE))
|
if (strlen(n) == 0 && !(cache->flags & F_REVERSE))
|
||||||
n = "<Root>";
|
n = "<Root>";
|
||||||
@@ -1868,7 +1826,7 @@ void dump_cache(time_t now)
|
|||||||
else if (cache->flags & F_DNSKEY)
|
else if (cache->flags & F_DNSKEY)
|
||||||
t = "K";
|
t = "K";
|
||||||
#endif
|
#endif
|
||||||
else /* non-terminal */
|
else if (!(cache->flags & F_NXDOMAIN)) /* non-terminal */
|
||||||
t = "!";
|
t = "!";
|
||||||
|
|
||||||
p += sprintf(p, "%-40.40s %s%s%s%s%s%s%s%s%s%s ", a, t,
|
p += sprintf(p, "%-40.40s %s%s%s%s%s%s%s%s%s%s ", a, t,
|
||||||
@@ -1887,10 +1845,65 @@ void dump_cache(time_t now)
|
|||||||
p += sprintf(p, "%-24.24s", cache->flags & F_IMMORTAL ? "" : ctime(&(cache->ttd)));
|
p += sprintf(p, "%-24.24s", cache->flags & F_IMMORTAL ? "" : ctime(&(cache->ttd)));
|
||||||
#endif
|
#endif
|
||||||
if(cache->flags & (F_HOSTS | F_CONFIG) && cache->uid > 0)
|
if(cache->flags & (F_HOSTS | F_CONFIG) && cache->uid > 0)
|
||||||
p += sprintf(p, " %s", record_source(cache->uid));
|
p += sprintf(p, " %-40.40s", record_source(cache->uid));
|
||||||
|
|
||||||
my_syslog(LOG_INFO, "%s", daemon->namebuff);
|
my_syslog(LOG_INFO, "%s", buff);
|
||||||
|
}
|
||||||
|
|
||||||
|
void dump_cache(time_t now)
|
||||||
|
{
|
||||||
|
struct server *serv, *serv1;
|
||||||
|
|
||||||
|
my_syslog(LOG_INFO, _("time %lu"), (unsigned long)now);
|
||||||
|
my_syslog(LOG_INFO, _("cache size %d, %d/%d cache insertions re-used unexpired cache entries."),
|
||||||
|
daemon->cachesize, daemon->metrics[METRIC_DNS_CACHE_LIVE_FREED], daemon->metrics[METRIC_DNS_CACHE_INSERTED]);
|
||||||
|
my_syslog(LOG_INFO, _("queries forwarded %u, queries answered locally %u"),
|
||||||
|
daemon->metrics[METRIC_DNS_QUERIES_FORWARDED], daemon->metrics[METRIC_DNS_LOCAL_ANSWERED]);
|
||||||
|
if (daemon->cache_max_expiry != 0)
|
||||||
|
my_syslog(LOG_INFO, _("queries answered from stale cache %u"), daemon->metrics[METRIC_DNS_STALE_ANSWERED]);
|
||||||
|
#ifdef HAVE_AUTH
|
||||||
|
my_syslog(LOG_INFO, _("queries for authoritative zones %u"), daemon->metrics[METRIC_DNS_AUTH_ANSWERED]);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
blockdata_report();
|
||||||
|
|
||||||
|
/* sum counts from different records for same server */
|
||||||
|
for (serv = daemon->servers; serv; serv = serv->next)
|
||||||
|
serv->flags &= ~SERV_MARK;
|
||||||
|
|
||||||
|
for (serv = daemon->servers; serv; serv = serv->next)
|
||||||
|
if (!(serv->flags & SERV_MARK))
|
||||||
|
{
|
||||||
|
int port;
|
||||||
|
unsigned int queries = 0, failed_queries = 0, nxdomain_replies = 0, retrys = 0;
|
||||||
|
unsigned int sigma_latency = 0, count_latency = 0;
|
||||||
|
|
||||||
|
for (serv1 = serv; serv1; serv1 = serv1->next)
|
||||||
|
if (!(serv1->flags & SERV_MARK) && sockaddr_isequal(&serv->addr, &serv1->addr))
|
||||||
|
{
|
||||||
|
serv1->flags |= SERV_MARK;
|
||||||
|
queries += serv1->queries;
|
||||||
|
failed_queries += serv1->failed_queries;
|
||||||
|
nxdomain_replies += serv1->nxdomain_replies;
|
||||||
|
retrys += serv1->retrys;
|
||||||
|
sigma_latency += serv1->query_latency;
|
||||||
|
count_latency++;
|
||||||
}
|
}
|
||||||
|
port = prettyprint_addr(&serv->addr, daemon->addrbuff);
|
||||||
|
my_syslog(LOG_INFO, _("server %s#%d: queries sent %u, retried %u, failed %u, nxdomain replies %u, avg. latency %ums"),
|
||||||
|
daemon->addrbuff, port, queries, retrys, failed_queries, nxdomain_replies, sigma_latency/count_latency);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (option_bool(OPT_DEBUG) || option_bool(OPT_LOG))
|
||||||
|
{
|
||||||
|
struct crec *cache;
|
||||||
|
int i;
|
||||||
|
my_syslog(LOG_INFO, "Host Address Flags Expires Source");
|
||||||
|
my_syslog(LOG_INFO, "------------------------------ ---------------------------------------- ---------- ------------------------ ------------");
|
||||||
|
|
||||||
|
for (i=0; i<hash_size; i++)
|
||||||
|
for (cache = hash_table[i]; cache; cache = cache->hash_next)
|
||||||
|
dump_cache_entry(cache, now);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -281,7 +281,8 @@ struct event_desc {
|
|||||||
#define OPT_STRIP_ECS 69
|
#define OPT_STRIP_ECS 69
|
||||||
#define OPT_STRIP_MAC 70
|
#define OPT_STRIP_MAC 70
|
||||||
#define OPT_NORR 71
|
#define OPT_NORR 71
|
||||||
#define OPT_LAST 72
|
#define OPT_NO_IDENT 72
|
||||||
|
#define OPT_LAST 73
|
||||||
|
|
||||||
#define OPTION_BITS (sizeof(unsigned int)*8)
|
#define OPTION_BITS (sizeof(unsigned int)*8)
|
||||||
#define OPTION_SIZE ( (OPT_LAST/OPTION_BITS)+((OPT_LAST%OPTION_BITS)!=0) )
|
#define OPTION_SIZE ( (OPT_LAST/OPTION_BITS)+((OPT_LAST%OPTION_BITS)!=0) )
|
||||||
|
|||||||
+22
-15
@@ -185,6 +185,7 @@ struct myoption {
|
|||||||
#define LOPT_FAST_RETRY 376
|
#define LOPT_FAST_RETRY 376
|
||||||
#define LOPT_STALE_CACHE 377
|
#define LOPT_STALE_CACHE 377
|
||||||
#define LOPT_NORR 378
|
#define LOPT_NORR 378
|
||||||
|
#define LOPT_NO_IDENT 379
|
||||||
|
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
static const struct option opts[] =
|
static const struct option opts[] =
|
||||||
@@ -374,6 +375,7 @@ static const struct myoption opts[] =
|
|||||||
{ "port-limit", 1, 0, LOPT_RANDPORT_LIM },
|
{ "port-limit", 1, 0, LOPT_RANDPORT_LIM },
|
||||||
{ "fast-dns-retry", 2, 0, LOPT_FAST_RETRY },
|
{ "fast-dns-retry", 2, 0, LOPT_FAST_RETRY },
|
||||||
{ "use-stale-cache", 2, 0 , LOPT_STALE_CACHE },
|
{ "use-stale-cache", 2, 0 , LOPT_STALE_CACHE },
|
||||||
|
{ "no-ident", 0, 0, LOPT_NO_IDENT },
|
||||||
{ NULL, 0, 0, 0 }
|
{ NULL, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -570,6 +572,7 @@ static struct {
|
|||||||
{ LOPT_UMBRELLA, ARG_ONE, "[=<optspec>]", gettext_noop("Send Cisco Umbrella identifiers including remote IP."), NULL },
|
{ LOPT_UMBRELLA, ARG_ONE, "[=<optspec>]", gettext_noop("Send Cisco Umbrella identifiers including remote IP."), NULL },
|
||||||
{ LOPT_QUIET_TFTP, OPT_QUIET_TFTP, NULL, gettext_noop("Do not log routine TFTP."), NULL },
|
{ LOPT_QUIET_TFTP, OPT_QUIET_TFTP, NULL, gettext_noop("Do not log routine TFTP."), NULL },
|
||||||
{ LOPT_NORR, OPT_NORR, NULL, gettext_noop("Suppress round-robin ordering of DNS records."), NULL },
|
{ LOPT_NORR, OPT_NORR, NULL, gettext_noop("Suppress round-robin ordering of DNS records."), NULL },
|
||||||
|
{ LOPT_NO_IDENT, OPT_NO_IDENT, NULL, gettext_noop("Do not add CHAOS TXT records."), NULL },
|
||||||
{ 0, 0, NULL, NULL, NULL }
|
{ 0, 0, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5757,21 +5760,6 @@ void read_opts(int argc, char **argv, char *compile_opts)
|
|||||||
daemon->randport_limit = 1;
|
daemon->randport_limit = 1;
|
||||||
daemon->host_index = SRC_AH;
|
daemon->host_index = SRC_AH;
|
||||||
|
|
||||||
#ifndef NO_ID
|
|
||||||
add_txt("version.bind", "dnsmasq-" VERSION, 0 );
|
|
||||||
add_txt("authors.bind", "Simon Kelley", 0);
|
|
||||||
add_txt("copyright.bind", COPYRIGHT, 0);
|
|
||||||
add_txt("cachesize.bind", NULL, TXT_STAT_CACHESIZE);
|
|
||||||
add_txt("insertions.bind", NULL, TXT_STAT_INSERTS);
|
|
||||||
add_txt("evictions.bind", NULL, TXT_STAT_EVICTIONS);
|
|
||||||
add_txt("misses.bind", NULL, TXT_STAT_MISSES);
|
|
||||||
add_txt("hits.bind", NULL, TXT_STAT_HITS);
|
|
||||||
#ifdef HAVE_AUTH
|
|
||||||
add_txt("auth.bind", NULL, TXT_STAT_AUTH);
|
|
||||||
#endif
|
|
||||||
add_txt("servers.bind", NULL, TXT_STAT_SERVERS);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* See comment above make_servers(). Optimises server-read code. */
|
/* See comment above make_servers(). Optimises server-read code. */
|
||||||
mark_servers(0);
|
mark_servers(0);
|
||||||
|
|
||||||
@@ -5869,6 +5857,25 @@ void read_opts(int argc, char **argv, char *compile_opts)
|
|||||||
else
|
else
|
||||||
one_file(CONFFILE, LOPT_CONF_OPT);
|
one_file(CONFFILE, LOPT_CONF_OPT);
|
||||||
|
|
||||||
|
/* Add TXT records if wanted */
|
||||||
|
#ifndef NO_ID
|
||||||
|
if (!option_bool(OPT_NO_IDENT))
|
||||||
|
{
|
||||||
|
add_txt("version.bind", "dnsmasq-" VERSION, 0 );
|
||||||
|
add_txt("authors.bind", "Simon Kelley", 0);
|
||||||
|
add_txt("copyright.bind", COPYRIGHT, 0);
|
||||||
|
add_txt("cachesize.bind", NULL, TXT_STAT_CACHESIZE);
|
||||||
|
add_txt("insertions.bind", NULL, TXT_STAT_INSERTS);
|
||||||
|
add_txt("evictions.bind", NULL, TXT_STAT_EVICTIONS);
|
||||||
|
add_txt("misses.bind", NULL, TXT_STAT_MISSES);
|
||||||
|
add_txt("hits.bind", NULL, TXT_STAT_HITS);
|
||||||
|
#ifdef HAVE_AUTH
|
||||||
|
add_txt("auth.bind", NULL, TXT_STAT_AUTH);
|
||||||
|
#endif
|
||||||
|
add_txt("servers.bind", NULL, TXT_STAT_SERVERS);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* port might not be known when the address is parsed - fill in here */
|
/* port might not be known when the address is parsed - fill in here */
|
||||||
if (daemon->servers)
|
if (daemon->servers)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user