mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-12-05 22:18:35 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
142456cfd0 | ||
|
|
207ce40db2 | ||
|
|
881eaa4dbc | ||
|
|
d6d7527c95 | ||
|
|
11b4be2036 | ||
|
|
3e306c1202 |
No files matched your search
@@ -5,10 +5,10 @@ version 2.88
|
|||||||
Add --fast-dns-retry option. This gives dnsmasq the ability
|
Add --fast-dns-retry option. This gives dnsmasq the ability
|
||||||
to originate retries for upstream DNS queries itself, rather
|
to originate retries for upstream DNS queries itself, rather
|
||||||
than relying on the downstream client. This is most useful
|
than relying on the downstream client. This is most useful
|
||||||
when doing DNSSEC over unreliable upstream network. It comes
|
when doing DNSSEC over unreliable upstream networks. It comes
|
||||||
with some cost in memory usage and network bandwidth.
|
with some cost in memory usage and network bandwidth.
|
||||||
|
|
||||||
Add -use-stale-cache option. When set, if a DNS name exists
|
Add --use-stale-cache option. When set, if a DNS name exists
|
||||||
in the cache, but its time-to-live has expired, dnsmasq will
|
in the cache, but its time-to-live has expired, dnsmasq will
|
||||||
return the data anyway. (It attempts to refresh the
|
return the data anyway. (It attempts to refresh the
|
||||||
data with an upstream query after returning the stale data.)
|
data with an upstream query after returning the stale data.)
|
||||||
@@ -26,18 +26,18 @@ version 2.88
|
|||||||
servers being removed from the configuration when reloading
|
servers being removed from the configuration when reloading
|
||||||
server configuration from DBus, or re-reading /etc/resolv.conf
|
server configuration from DBus, or re-reading /etc/resolv.conf
|
||||||
Only servers from the same source should be replaced, but some
|
Only servers from the same source should be replaced, but some
|
||||||
servers from other sources (ie hard coded or another dynamic source)
|
servers from other sources (i.e., hard coded or another dynamic source)
|
||||||
could mysteriously disappear. Thanks to all reporting this,
|
could mysteriously disappear. Thanks to all reporting this,
|
||||||
but especially Christopher J. Masden who reduced the problem
|
but especially Christopher J. Madsen who reduced the problem
|
||||||
to an easily reproducible case which saved mucg labour in
|
to an easily reproducible case which saved much labour in
|
||||||
finding it.
|
finding it.
|
||||||
|
|
||||||
Add --no-round-robin option.
|
Add --no-round-robin option.
|
||||||
|
|
||||||
Allow domain names as well as IP addresses when specifying
|
Allow domain names as well as IP addresses when specifying
|
||||||
upstream DNS servers. There are some gotchas associated with this,
|
upstream DNS servers. There are some gotchas associated with this
|
||||||
(it will mysteriously fail to work if the dnsmasq instance
|
(it will mysteriously fail to work if the dnsmasq instance
|
||||||
being started is in the path from the system resolver to the DNS)
|
being started is in the path from the system resolver to the DNS),
|
||||||
and a seemingly sensible configuration like
|
and a seemingly sensible configuration like
|
||||||
--server=domain.name@1.2.3.4 is unactionable if domain.name
|
--server=domain.name@1.2.3.4 is unactionable if domain.name
|
||||||
only resolves to an IPv6 address). There are, however,
|
only resolves to an IPv6 address). There are, however,
|
||||||
@@ -46,9 +46,19 @@ version 2.88
|
|||||||
|
|
||||||
Handle DS records for unsupported crypto algorithms correctly.
|
Handle DS records for unsupported crypto algorithms correctly.
|
||||||
Such a DS, as long as it is validated, should allow answers
|
Such a DS, as long as it is validated, should allow answers
|
||||||
in the domain is attests to be returned as unvalidated, and not
|
in the domain it attests to be returned as unvalidated, and not
|
||||||
as a validation error.
|
as a validation error.
|
||||||
|
|
||||||
|
Optimise reading large numbers of --server options. When re-reading
|
||||||
|
upstream servers from /etc/resolv.conf or other sources that
|
||||||
|
can change dnsmasq tries to avoid memory fragmentation by re-using
|
||||||
|
existing records that are being re-read unchanged. This involves
|
||||||
|
seaching all the server records for each new one installed.
|
||||||
|
During startup this search is pointless, and can cause long
|
||||||
|
start times with thousands of --server options because the work
|
||||||
|
needed is O(n^2). Handle this case more intelligently.
|
||||||
|
Thanks to Ye Zhou for spotting the problem and an initial patch.
|
||||||
|
|
||||||
|
|
||||||
version 2.87
|
version 2.87
|
||||||
Allow arbitrary prefix lengths in --rev-server and
|
Allow arbitrary prefix lengths in --rev-server and
|
||||||
|
|||||||
+2
-1
@@ -1166,7 +1166,8 @@ given in a
|
|||||||
.B --dhcp-host
|
.B --dhcp-host
|
||||||
option, but aliases are possible by using CNAMEs. (See
|
option, but aliases are possible by using CNAMEs. (See
|
||||||
.B --cname
|
.B --cname
|
||||||
).
|
). Note that /etc/hosts is NOT used when the DNS server side of dnsmasq
|
||||||
|
is disabled by setting the DNS server port to zero.
|
||||||
|
|
||||||
More than one
|
More than one
|
||||||
.B --dhcp-host
|
.B --dhcp-host
|
||||||
|
|||||||
+846
-679
File diff suppressed because it is too large.
Load diff
@@ -546,11 +546,23 @@ static int order_qsort(const void *a, const void *b)
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* When loading large numbers of server=.... lines during startup,
|
||||||
|
there's no possibility that there will be server records that can be reused, but
|
||||||
|
searching a long list for each server added grows as O(n^2) and slows things down.
|
||||||
|
This flag is set only if is known there may be free server records that can be reused.
|
||||||
|
There's a call to mark_servers(0) in read_opts() to reset the flag before
|
||||||
|
main config read. */
|
||||||
|
|
||||||
|
static int maybe_free_servers = 0;
|
||||||
|
|
||||||
/* Must be called before add_update_server() to set daemon->servers_tail */
|
/* Must be called before add_update_server() to set daemon->servers_tail */
|
||||||
void mark_servers(int flag)
|
void mark_servers(int flag)
|
||||||
{
|
{
|
||||||
struct server *serv, **up;
|
struct server *serv, **up;
|
||||||
|
|
||||||
|
maybe_free_servers = !!flag;
|
||||||
|
|
||||||
daemon->servers_tail = NULL;
|
daemon->servers_tail = NULL;
|
||||||
|
|
||||||
/* mark everything with argument flag */
|
/* mark everything with argument flag */
|
||||||
@@ -668,6 +680,9 @@ int add_update_server(int flags,
|
|||||||
be at the end. */
|
be at the end. */
|
||||||
struct server **up, *tmp;
|
struct server **up, *tmp;
|
||||||
|
|
||||||
|
serv = NULL;
|
||||||
|
|
||||||
|
if (maybe_free_servers)
|
||||||
for (serv = daemon->servers, up = &daemon->servers; serv; serv = tmp)
|
for (serv = daemon->servers, up = &daemon->servers; serv; serv = tmp)
|
||||||
{
|
{
|
||||||
tmp = serv->next;
|
tmp = serv->next;
|
||||||
|
|||||||
+9
-4
@@ -866,9 +866,6 @@ char *parse_server(char *arg, struct server_details *sdetails)
|
|||||||
|
|
||||||
*sdetails->interface = 0;
|
*sdetails->interface = 0;
|
||||||
sdetails->addr_type = AF_UNSPEC;
|
sdetails->addr_type = AF_UNSPEC;
|
||||||
sdetails->valid = 0;
|
|
||||||
sdetails->hostinfo = sdetails->orig_hostinfo = NULL;
|
|
||||||
|
|
||||||
|
|
||||||
if (strcmp(arg, "#") == 0)
|
if (strcmp(arg, "#") == 0)
|
||||||
{
|
{
|
||||||
@@ -1104,6 +1101,8 @@ static char *domain_rev4(int from_file, char *server, struct in_addr *addr4, int
|
|||||||
char interface[IF_NAMESIZE+1];
|
char interface[IF_NAMESIZE+1];
|
||||||
int count = 1, rem, addrbytes, addrbits;
|
int count = 1, rem, addrbytes, addrbits;
|
||||||
struct server_details sdetails;
|
struct server_details sdetails;
|
||||||
|
|
||||||
|
memset(&sdetails, 0, sizeof(struct server_details));
|
||||||
sdetails.addr = &serv_addr;
|
sdetails.addr = &serv_addr;
|
||||||
sdetails.source_addr = &source_addr;
|
sdetails.source_addr = &source_addr;
|
||||||
sdetails.interface = interface;
|
sdetails.interface = interface;
|
||||||
@@ -1185,6 +1184,8 @@ static char *domain_rev6(int from_file, char *server, struct in6_addr *addr6, in
|
|||||||
char interface[IF_NAMESIZE+1];
|
char interface[IF_NAMESIZE+1];
|
||||||
int count = 1, rem, addrbytes, addrbits;
|
int count = 1, rem, addrbytes, addrbits;
|
||||||
struct server_details sdetails;
|
struct server_details sdetails;
|
||||||
|
|
||||||
|
memset(&sdetails, 0, sizeof(struct server_details));
|
||||||
sdetails.addr = &serv_addr;
|
sdetails.addr = &serv_addr;
|
||||||
sdetails.source_addr = &source_addr;
|
sdetails.source_addr = &source_addr;
|
||||||
sdetails.interface = interface;
|
sdetails.interface = interface;
|
||||||
@@ -2970,8 +2971,9 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
union all_addr addr;
|
union all_addr addr;
|
||||||
union mysockaddr serv_addr, source_addr;
|
union mysockaddr serv_addr, source_addr;
|
||||||
char interface[IF_NAMESIZE+1];
|
char interface[IF_NAMESIZE+1];
|
||||||
|
|
||||||
struct server_details sdetails;
|
struct server_details sdetails;
|
||||||
|
|
||||||
|
memset(&sdetails, 0, sizeof(struct server_details));
|
||||||
sdetails.addr = &serv_addr;
|
sdetails.addr = &serv_addr;
|
||||||
sdetails.source_addr = &source_addr;
|
sdetails.source_addr = &source_addr;
|
||||||
sdetails.interface = interface;
|
sdetails.interface = interface;
|
||||||
@@ -5752,6 +5754,9 @@ void read_opts(int argc, char **argv, char *compile_opts)
|
|||||||
add_txt("servers.bind", NULL, TXT_STAT_SERVERS);
|
add_txt("servers.bind", NULL, TXT_STAT_SERVERS);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* See comment above make_servers(). Optimises server-read code. */
|
||||||
|
mark_servers(0);
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
|
|||||||
Reference in new issue
Block a user