mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-18 19:41:03 +00:00
Compare commits
5
Commits
v2.82test1
...
v2.82
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f60fea1fb0 | ||
|
|
4d85e409cd | ||
|
|
2bd02d2f59 | ||
|
|
7e194a0a7d | ||
|
|
9beb4d9ea2 |
No files matched your search
@@ -1,6 +1,27 @@
|
|||||||
|
version 2.82
|
||||||
|
Improve behaviour in the face of network interfaces which come
|
||||||
|
and go and change index. Thanks to Petr Mensik for the patch.
|
||||||
|
|
||||||
|
Convert hard startup failure on NETLINK_NO_ENOBUFS under qemu-user
|
||||||
|
to a warning.
|
||||||
|
|
||||||
|
Allow IPv6 addresses ofthe form [::ffff:1.2.3.4] in --dhcp-option.
|
||||||
|
|
||||||
|
Fix crash under heavy TCP connection load introduced in 2.81.
|
||||||
|
Thanks to Frank for good work chasing this down.
|
||||||
|
|
||||||
|
Change default lease time for DHCPv6 to one day.
|
||||||
|
|
||||||
|
Alter calculation of preferred and valid times in router
|
||||||
|
advertisements, so that these do not have a floor applied
|
||||||
|
of the lease time in the dhcp-range if this is not explicitly
|
||||||
|
specified and is merely the default.
|
||||||
|
Thanks to Martin-Éric Racine for suggestions on this.
|
||||||
|
|
||||||
|
|
||||||
version 2.81
|
version 2.81
|
||||||
Improve cache behaviour for TCP connections. For ease of
|
Improve cache behaviour for TCP connections. For ease of
|
||||||
implementaion, dnsmasq has always forked a new process to handle
|
implementation, dnsmasq has always forked a new process to handle
|
||||||
each incoming TCP connection. A side-effect of this is that
|
each incoming TCP connection. A side-effect of this is that
|
||||||
any DNS queries answered from TCP connections are not cached:
|
any DNS queries answered from TCP connections are not cached:
|
||||||
when TCP connections were rare, this was not a problem.
|
when TCP connections were rare, this was not a problem.
|
||||||
|
|||||||
+2
-2
@@ -428,7 +428,7 @@ Tells dnsmasq to never forward A or AAAA queries for plain names, without dots
|
|||||||
or domain parts, to upstream nameservers. If the name is not known
|
or domain parts, to upstream nameservers. If the name is not known
|
||||||
from /etc/hosts or DHCP then a "not found" answer is returned.
|
from /etc/hosts or DHCP then a "not found" answer is returned.
|
||||||
.TP
|
.TP
|
||||||
.B \-S, --local, --server=[/[<domain>]/[domain/]][<ipaddr>[#<port>][@<source-ip>|<interface>[#<port>]]
|
.B \-S, --local, --server=[/[<domain>]/[domain/]][<ipaddr>[#<port>]][@<source-ip>|<interface>[#<port>]]
|
||||||
Specify IP address of upstream servers directly. Setting this flag does
|
Specify IP address of upstream servers directly. Setting this flag does
|
||||||
not suppress reading of /etc/resolv.conf, use \fB--no-resolv\fP to do that. If one or more
|
not suppress reading of /etc/resolv.conf, use \fB--no-resolv\fP to do that. If one or more
|
||||||
optional domains are given, that server is used only for those domains
|
optional domains are given, that server is used only for those domains
|
||||||
@@ -861,7 +861,7 @@ in
|
|||||||
options. If the lease time is given, then leases
|
options. If the lease time is given, then leases
|
||||||
will be given for that length of time. The lease time is in seconds,
|
will be given for that length of time. The lease time is in seconds,
|
||||||
or minutes (eg 45m) or hours (eg 1h) or "infinite". If not given,
|
or minutes (eg 45m) or hours (eg 1h) or "infinite". If not given,
|
||||||
the default lease time is one hour. The
|
the default lease time is one hour for IPv4 and one day for IPv6. The
|
||||||
minimum lease time is two minutes. For IPv6 ranges, the lease time
|
minimum lease time is two minutes. For IPv6 ranges, the lease time
|
||||||
maybe "deprecated"; this sets the preferred lifetime sent in a DHCP
|
maybe "deprecated"; this sets the preferred lifetime sent in a DHCP
|
||||||
lease or router advertisement to zero, which causes clients to use
|
lease or router advertisement to zero, which causes clients to use
|
||||||
|
|||||||
+16
-3
@@ -472,11 +472,24 @@ void cache_start_insert(void)
|
|||||||
struct crec *cache_insert(char *name, union all_addr *addr, unsigned short class,
|
struct crec *cache_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)
|
||||||
{
|
{
|
||||||
/* Don't log DNSSEC records here, done elsewhere */
|
#ifdef HAVE_DNSSEC
|
||||||
if (flags & (F_IPV4 | F_IPV6 | F_CNAME | F_SRV))
|
if (flags & (F_DNSKEY | F_DS))
|
||||||
{
|
{
|
||||||
|
/* The DNSSEC validation process works by getting needed records into the
|
||||||
|
cache, then retrying the validation until they are all in place.
|
||||||
|
This can be messed up by very short TTLs, and _really_ messed up by
|
||||||
|
zero TTLs, so we force the TTL to be at least long enough to do a validation.
|
||||||
|
Ideally, we should use some kind of reference counting so that records are
|
||||||
|
locked until the validation that asked for them is complete, but this
|
||||||
|
is much easier, and just as effective. */
|
||||||
|
if (ttl < DNSSEC_MIN_TTL)
|
||||||
|
ttl = DNSSEC_MIN_TTL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
/* Don't log DNSSEC records here, done elsewhere */
|
||||||
log_query(flags | F_UPSTREAM, name, addr, NULL);
|
log_query(flags | F_UPSTREAM, name, addr, NULL);
|
||||||
/* Don't mess with TTL for DNSSEC records. */
|
|
||||||
if (daemon->max_cache_ttl != 0 && daemon->max_cache_ttl < ttl)
|
if (daemon->max_cache_ttl != 0 && daemon->max_cache_ttl < ttl)
|
||||||
ttl = daemon->max_cache_ttl;
|
ttl = daemon->max_cache_ttl;
|
||||||
if (daemon->min_cache_ttl != 0 && daemon->min_cache_ttl > ttl)
|
if (daemon->min_cache_ttl != 0 && daemon->min_cache_ttl > ttl)
|
||||||
|
|||||||
+3
-1
@@ -40,9 +40,11 @@
|
|||||||
#define DHCP_PACKET_MAX 16384 /* hard limit on DHCP packet size */
|
#define DHCP_PACKET_MAX 16384 /* hard limit on DHCP packet size */
|
||||||
#define SMALLDNAME 50 /* most domain names are smaller than this */
|
#define SMALLDNAME 50 /* most domain names are smaller than this */
|
||||||
#define CNAME_CHAIN 10 /* chains longer than this atr dropped for loop protection */
|
#define CNAME_CHAIN 10 /* chains longer than this atr dropped for loop protection */
|
||||||
|
#define DNSSEC_MIN_TTL 60 /* DNSKEY and DS records in cache last at least this long */
|
||||||
#define HOSTSFILE "/etc/hosts"
|
#define HOSTSFILE "/etc/hosts"
|
||||||
#define ETHERSFILE "/etc/ethers"
|
#define ETHERSFILE "/etc/ethers"
|
||||||
#define DEFLEASE 3600 /* default lease time, 1 hour */
|
#define DEFLEASE 3600 /* default DHCPv4 lease time, one hour */
|
||||||
|
#define DEFLEASE6 (3600*24) /* default lease time for DHCPv6. One day. */
|
||||||
#define CHUSER "nobody"
|
#define CHUSER "nobody"
|
||||||
#define CHGRP "dip"
|
#define CHGRP "dip"
|
||||||
#define TFTP_MAX_CONNECTIONS 50 /* max simultaneous connections */
|
#define TFTP_MAX_CONNECTIONS 50 /* max simultaneous connections */
|
||||||
|
|||||||
@@ -942,6 +942,7 @@ struct shared_network {
|
|||||||
#define CONTEXT_OLD (1u<<16)
|
#define CONTEXT_OLD (1u<<16)
|
||||||
#define CONTEXT_V6 (1u<<17)
|
#define CONTEXT_V6 (1u<<17)
|
||||||
#define CONTEXT_RA_OFF_LINK (1u<<18)
|
#define CONTEXT_RA_OFF_LINK (1u<<18)
|
||||||
|
#define CONTEXT_SETLEASE (1u<<19)
|
||||||
|
|
||||||
struct ping_result {
|
struct ping_result {
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
|
|||||||
+8
-2
@@ -2991,7 +2991,6 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
struct dhcp_context *new = opt_malloc(sizeof(struct dhcp_context));
|
struct dhcp_context *new = opt_malloc(sizeof(struct dhcp_context));
|
||||||
|
|
||||||
memset (new, 0, sizeof(*new));
|
memset (new, 0, sizeof(*new));
|
||||||
new->lease_time = DEFLEASE;
|
|
||||||
|
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
@@ -3041,6 +3040,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
if (inet_pton(AF_INET, a[0], &new->start))
|
if (inet_pton(AF_INET, a[0], &new->start))
|
||||||
{
|
{
|
||||||
new->next = daemon->dhcp;
|
new->next = daemon->dhcp;
|
||||||
|
new->lease_time = DEFLEASE;
|
||||||
daemon->dhcp = new;
|
daemon->dhcp = new;
|
||||||
new->end = new->start;
|
new->end = new->start;
|
||||||
if (strcmp(a[1], "static") == 0)
|
if (strcmp(a[1], "static") == 0)
|
||||||
@@ -3088,6 +3088,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
new->flags |= CONTEXT_V6;
|
new->flags |= CONTEXT_V6;
|
||||||
new->prefix = 64; /* default */
|
new->prefix = 64; /* default */
|
||||||
new->end6 = new->start6;
|
new->end6 = new->start6;
|
||||||
|
new->lease_time = DEFLEASE6;
|
||||||
new->next = daemon->dhcp6;
|
new->next = daemon->dhcp6;
|
||||||
daemon->dhcp6 = new;
|
daemon->dhcp6 = new;
|
||||||
|
|
||||||
@@ -3187,7 +3188,10 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(a[leasepos], "infinite") == 0)
|
if (strcmp(a[leasepos], "infinite") == 0)
|
||||||
new->lease_time = 0xffffffff;
|
{
|
||||||
|
new->lease_time = 0xffffffff;
|
||||||
|
new->flags |= CONTEXT_SETLEASE;
|
||||||
|
}
|
||||||
else if (strcmp(a[leasepos], "deprecated") == 0)
|
else if (strcmp(a[leasepos], "deprecated") == 0)
|
||||||
new->flags |= CONTEXT_DEPRECATE;
|
new->flags |= CONTEXT_DEPRECATE;
|
||||||
else
|
else
|
||||||
@@ -3226,6 +3230,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
ret_err_free(_("bad dhcp-range"), new);
|
ret_err_free(_("bad dhcp-range"), new);
|
||||||
|
|
||||||
new->lease_time = atoi(a[leasepos]) * fac;
|
new->lease_time = atoi(a[leasepos]) * fac;
|
||||||
|
new->flags |= CONTEXT_SETLEASE;
|
||||||
/* Leases of a minute or less confuse
|
/* Leases of a minute or less confuse
|
||||||
some clients, notably Apple's */
|
some clients, notably Apple's */
|
||||||
if (new->lease_time < 120)
|
if (new->lease_time < 120)
|
||||||
@@ -3233,6 +3238,7 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -626,8 +626,11 @@ static int add_prefixes(struct in6_addr *local, int prefix,
|
|||||||
real_prefix = context->prefix;
|
real_prefix = context->prefix;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* find floor time, don't reduce below 3 * RA interval. */
|
/* find floor time, don't reduce below 3 * RA interval.
|
||||||
if (time > context->lease_time)
|
If the lease time has been left as default, don't
|
||||||
|
use that as a floor. */
|
||||||
|
if ((context->flags & CONTEXT_SETLEASE) &&
|
||||||
|
time > context->lease_time)
|
||||||
{
|
{
|
||||||
time = context->lease_time;
|
time = context->lease_time;
|
||||||
if (time < ((unsigned int)(3 * param->adv_interval)))
|
if (time < ((unsigned int)(3 * param->adv_interval)))
|
||||||
|
|||||||
Reference in new issue
Block a user