mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-19 19:51:01 +00:00
Compare commits
12
Commits
v2.69rc2
...
v2.71test1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
50f86ce8e4 | ||
|
|
7e22cf28f8 | ||
|
|
3b1b3e9d50 | ||
|
|
ab72091de2 | ||
|
|
66f57867d8 | ||
|
|
6375838445 | ||
|
|
82a14af5e7 | ||
|
|
97dce08ed7 | ||
|
|
198d940af6 | ||
|
|
1d7e0a36e3 | ||
|
|
10068600f8 | ||
|
|
b7639d5815 |
No files matched your search
@@ -1,3 +1,12 @@
|
|||||||
|
version 2.70
|
||||||
|
Fix crash, introduced in 2.69, on TCP request when dnsmasq
|
||||||
|
compiled with DNSSEC support, but running without DNSSEC
|
||||||
|
enabled. Thanks to Manish Sing for spotting that one.
|
||||||
|
|
||||||
|
Fix regression which broke ipset functionality. Thanks to
|
||||||
|
Wang Jian for the bug report.
|
||||||
|
|
||||||
|
|
||||||
version 2.69
|
version 2.69
|
||||||
Implement dynamic interface discovery on *BSD. This allows
|
Implement dynamic interface discovery on *BSD. This allows
|
||||||
the contructor: syntax to be used in dhcp-range for DHCPv6
|
the contructor: syntax to be used in dhcp-range for DHCPv6
|
||||||
@@ -28,9 +37,9 @@ version 2.69
|
|||||||
|
|
||||||
make dnsmasq COPTS='-DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC'
|
make dnsmasq COPTS='-DHAVE_DNSSEC -DHAVE_DNSSEC_STATIC'
|
||||||
|
|
||||||
which bloats the dnsmasq binary to over a megabyte, but
|
which bloats the dnsmasq binary, but saves the size of
|
||||||
saves the size of the shared libraries which are five
|
the shared libraries which are much bigger.
|
||||||
times that size.
|
|
||||||
To enable, DNSSEC, you will need a set of
|
To enable, DNSSEC, you will need a set of
|
||||||
trust-anchors. Now that the TLDs are signed, this can be
|
trust-anchors. Now that the TLDs are signed, this can be
|
||||||
the keys for the root zone, and for convenience they are
|
the keys for the root zone, and for convenience they are
|
||||||
@@ -56,6 +65,36 @@ version 2.69
|
|||||||
downstream validators. Setting --log-queries will show
|
downstream validators. Setting --log-queries will show
|
||||||
DNSSEC in action.
|
DNSSEC in action.
|
||||||
|
|
||||||
|
If a domain is returned from an upstream nameserver without
|
||||||
|
DNSSEC signature, dnsmasq by default trusts this. This
|
||||||
|
means that for unsigned zone (still the majority) there
|
||||||
|
is effectively no cost for having DNSSEC enabled. Of course
|
||||||
|
this allows an attacker to replace a signed record with a
|
||||||
|
false unsigned record. This is addressed by the
|
||||||
|
--dnssec-check-unsigned flag, which instructs dnsmasq
|
||||||
|
to prove that an unsigned record is legitimate, by finding
|
||||||
|
a secure proof that the zone containing the record is not
|
||||||
|
signed. Doing this has costs (typically one or two extra
|
||||||
|
upstream queries). It also has a nasty failure mode if
|
||||||
|
dnsmasq's upstream nameservers are not DNSSEC capable.
|
||||||
|
Without --dnssec-check-unsigned using such an upstream
|
||||||
|
server will simply result in not queries being validated;
|
||||||
|
with --dnssec-check-unsigned enabled and a
|
||||||
|
DNSSEC-ignorant upstream server, _all_ queries will fail.
|
||||||
|
|
||||||
|
Note that DNSSEC requires that the local time is valid and
|
||||||
|
accurate, if not then DNSSEC validation will fail. NTP
|
||||||
|
should be running. This presents a problem for routers
|
||||||
|
without a battery-backed clock. To set the time needs NTP
|
||||||
|
to do DNS lookups, but lookups will fail until NTP has run.
|
||||||
|
To address this, there's a flag, --dnssec-no-timecheck
|
||||||
|
which disables the time checks (only) in DNSSEC. When dnsmasq
|
||||||
|
is started and the clock is not synced, this flag should
|
||||||
|
be used. As soon as the clock is synced, SIGHUP dnsmasq.
|
||||||
|
The SIGHUP clears the cache of partially-validated data and
|
||||||
|
resets the no-timecheck flag, so that all DNSSEC checks
|
||||||
|
henceforward will be complete.
|
||||||
|
|
||||||
The development of DNSSEC in dnsmasq was started by
|
The development of DNSSEC in dnsmasq was started by
|
||||||
Giovanni Bajo, to whom huge thanks are owed. It has been
|
Giovanni Bajo, to whom huge thanks are owed. It has been
|
||||||
supported by Comcast, whose techfund grant has allowed for
|
supported by Comcast, whose techfund grant has allowed for
|
||||||
@@ -80,6 +119,13 @@ version 2.69
|
|||||||
encountered. Thanks to Andy and the rt-n56u project for
|
encountered. Thanks to Andy and the rt-n56u project for
|
||||||
find this and helping to chase it down.
|
find this and helping to chase it down.
|
||||||
|
|
||||||
|
Fix wrong RCODE in authoritative DNS replies to PTR queries. The
|
||||||
|
correct answer was included, but the RCODE was set to NXDOMAIN.
|
||||||
|
Thanks to Craig McQueen for spotting this.
|
||||||
|
|
||||||
|
Make statistics available as DNS queries in the .bind TLD as
|
||||||
|
well as logging them.
|
||||||
|
|
||||||
|
|
||||||
version 2.68
|
version 2.68
|
||||||
Use random addresses for DHCPv6 temporary address
|
Use random addresses for DHCPv6 temporary address
|
||||||
|
|||||||
Vendored
+12
-4
@@ -1,11 +1,19 @@
|
|||||||
|
dnsmasq (2.70-1) unstable; urgency=low
|
||||||
|
|
||||||
|
* New upstream.
|
||||||
|
|
||||||
|
-- Simon Kelley <simon@thekelleys.org.uk> Wed, 23 Apr 2014 15:14:42 +0000
|
||||||
|
|
||||||
dnsmasq (2.69-1) unstable; urgency=low
|
dnsmasq (2.69-1) unstable; urgency=low
|
||||||
|
|
||||||
* New upstream.
|
* New upstream.
|
||||||
* Set --local-service. (closes: #732610)
|
* Set --local-service. (closes: #732610)
|
||||||
This tells dnsmasq to ignore DNS requests that don't come from a local network.
|
This tells dnsmasq to ignore DNS requests that don't come
|
||||||
It's automatically ignored if --interface --except-interface, --listen-address
|
from a local network. It's automatically ignored if
|
||||||
or --auth-server exist in the configuration, so for most installations, it will
|
--interface --except-interface, --listen-address or
|
||||||
have no effect, but for otherwise-unconfigured installations, it stops dnsmasq
|
--auth-server exist in the configuration, so for most
|
||||||
|
installations, it will have no effect, but for
|
||||||
|
otherwise-unconfigured installations, it stops dnsmasq
|
||||||
from being vulnerable to DNS-reflection attacks.
|
from being vulnerable to DNS-reflection attacks.
|
||||||
|
|
||||||
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 4 Feb 2014 16:28:12 +0000
|
-- Simon Kelley <simon@thekelleys.org.uk> Tue, 4 Feb 2014 16:28:12 +0000
|
||||||
|
|||||||
Vendored
+1
-1
@@ -27,7 +27,7 @@ CONFIG_DIR=/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new
|
|||||||
# If the resolvconf package is installed, dnsmasq will use its output
|
# If the resolvconf package is installed, dnsmasq will use its output
|
||||||
# rather than the contents of /etc/resolv.conf to find upstream
|
# rather than the contents of /etc/resolv.conf to find upstream
|
||||||
# nameservers. Uncommenting this line inhibits this behaviour.
|
# nameservers. Uncommenting this line inhibits this behaviour.
|
||||||
# Not that including a "resolv-file=<filename>" line in
|
# Note that including a "resolv-file=<filename>" line in
|
||||||
# /etc/dnsmasq.conf is not enough to override resolvconf if it is
|
# /etc/dnsmasq.conf is not enough to override resolvconf if it is
|
||||||
# installed: the line below must be uncommented.
|
# installed: the line below must be uncommented.
|
||||||
#IGNORE_RESOLVCONF=yes
|
#IGNORE_RESOLVCONF=yes
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<HTML>
|
<HTML>
|
||||||
<HEAD>
|
<HEAD>
|
||||||
<TITLE> Dnsmasq - a DNS forwarder for NAT firewalls.</TITLE>
|
<TITLE> Dnsmasq - network services for small networks.</TITLE>
|
||||||
<link rel="icon"
|
<link rel="icon"
|
||||||
href="http://www.thekelleys.org.uk/dnsmasq/images/favicon.ico">
|
href="http://www.thekelleys.org.uk/dnsmasq/images/favicon.ico">
|
||||||
</HEAD>
|
</HEAD>
|
||||||
@@ -11,82 +11,48 @@
|
|||||||
<td align="middle" valign="middle"><h1>Dnsmasq</h1></td>
|
<td align="middle" valign="middle"><h1>Dnsmasq</h1></td>
|
||||||
<td align="right" valign="middle"><img border="0" src="http://www.thekelleys.org.uk/dnsmasq/images/icon.png" /></td></tr>
|
<td align="right" valign="middle"><img border="0" src="http://www.thekelleys.org.uk/dnsmasq/images/icon.png" /></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
Dnsmasq provides network infrastructure for small networks: DNS, DHCP, router advertisement and network boot. It is designed to be
|
||||||
|
lightweight and have a small footprint, suitable for resource constrained routers and firewalls. It has also been widely used
|
||||||
|
for tethering on smartphones and portable hotspots, and to support virtual networking in virtualisation frameworks.
|
||||||
|
Supported platforms include Linux (with glibc and uclibc), Android, *BSD, and Mac OS X. Dnsmasq is included in most
|
||||||
|
Linux distributions and the ports systems of FreeBSD, OpenBSD and NetBSD. Dnsmasq provides full IPv6 support.
|
||||||
|
|
||||||
Dnsmasq is a lightweight, easy to configure DNS forwarder and DHCP
|
|
||||||
server. It is designed to provide DNS and, optionally, DHCP, to a
|
|
||||||
small network. It can serve the names of local machines which are
|
|
||||||
not in the global DNS. The DHCP server integrates with the DNS
|
|
||||||
server and allows machines with DHCP-allocated addresses
|
|
||||||
to appear in the DNS with names configured either in each host or
|
|
||||||
in a central configuration file. Dnsmasq supports static and dynamic
|
|
||||||
DHCP leases and BOOTP/TFTP/PXE for network booting of diskless machines.
|
|
||||||
<P>
|
<P>
|
||||||
Dnsmasq is targeted at home networks using NAT and
|
The DNS subsystem provides a local DNS server for the network, with forwarding of all query types to upstream recursive DNS servers and
|
||||||
connected to the internet via a modem, cable-modem or ADSL
|
cacheing of common record types (A, AAAA, CNAME and PTR, also DNSKEY and DS when DNSSEC is enabled).
|
||||||
connection but would be a good choice for any smallish network (up to
|
|
||||||
1000 clients is known to work) where low
|
|
||||||
resource use and ease of configuration are important.
|
|
||||||
<P>
|
|
||||||
Supported platforms include Linux (with glibc and uclibc), Android, *BSD,
|
|
||||||
Solaris and Mac OS X.
|
|
||||||
Dnsmasq is included in at least the following Linux distributions:
|
|
||||||
Gentoo, Debian, Slackware, Suse, Fedora,
|
|
||||||
Smoothwall, IP-Cop, floppyfw, Firebox, LEAF, Freesco, fli4l,
|
|
||||||
CoyoteLinux, Endian Firewall and
|
|
||||||
Clarkconnect. It is also available as FreeBSD, OpenBSD and NetBSD ports and is used in
|
|
||||||
Linksys wireless routers (dd-wrt, openwrt and the stock firmware) and the m0n0wall project.
|
|
||||||
<P>
|
|
||||||
Dnsmasq provides the following features:
|
|
||||||
<DIR>
|
<DIR>
|
||||||
|
<LI>Local DNS names can be defined by reading /etc/hosts, by importing names from the DHCP subsystem, or by configuration of a wide range of useful record types.</LI>
|
||||||
<LI>
|
<LI>Upstream servers can be configured in a variety of convenient ways, including dynamic configuration as these change on moving upstream network.
|
||||||
The DNS configuration of machines behind the firewall is simple and
|
<LI>Authoritative DNS mode allows local DNS names may be exported to zone in the global DNS. Dnsmasq acts as authoritative server for this zone, and also provides
|
||||||
doesn't depend on the details of the ISP's dns servers
|
zone transfer to secondaries for the zone, if required.</LI>
|
||||||
<LI>
|
<LI>DNSSEC validation may be performed on DNS replies from upstream nameservers, providing security against spoofing and cache poisoning.</LI>
|
||||||
Clients which try to do DNS lookups while a modem link to the
|
<LI>Specified sub-domains can be directed to their own upstream DNS servers, making VPN configuration easy.</LI>
|
||||||
internet is down will time out immediately.
|
<LI>Internationalised domain names are supported.
|
||||||
</LI>
|
|
||||||
<LI>
|
|
||||||
Dnsmasq will serve names from the /etc/hosts file on the firewall
|
|
||||||
machine: If the names of local machines are there, then they can all
|
|
||||||
be addressed without having to maintain /etc/hosts on each machine.
|
|
||||||
</LI>
|
|
||||||
<LI>
|
|
||||||
The integrated DHCP server supports static and dynamic DHCP leases and
|
|
||||||
multiple networks and IP ranges. It works across BOOTP relays and
|
|
||||||
supports DHCP options including RFC3397 DNS search lists.
|
|
||||||
Machines which are configured by DHCP have their names automatically
|
|
||||||
included in the DNS and the names can specified by each machine or
|
|
||||||
centrally by associating a name with a MAC address in the dnsmasq
|
|
||||||
config file.
|
|
||||||
</LI>
|
|
||||||
<LI>
|
|
||||||
Dnsmasq caches internet addresses (A records and AAAA records) and address-to-name
|
|
||||||
mappings (PTR records), reducing the load on upstream servers and
|
|
||||||
improving performance (especially on modem connections).
|
|
||||||
</LI>
|
|
||||||
<LI>
|
|
||||||
Dnsmasq can be configured to automatically pick up the addresses of
|
|
||||||
its upstream nameservers from ppp or dhcp configuration. It will
|
|
||||||
automatically reload this information if it changes. This facility
|
|
||||||
will be of particular interest to maintainers of Linux firewall
|
|
||||||
distributions since it allows dns configuration to be made automatic.
|
|
||||||
</LI>
|
|
||||||
<LI>
|
|
||||||
On IPv6-enabled boxes, dnsmasq can both talk to upstream servers via IPv6
|
|
||||||
and offer DNS service via IPv6. On dual-stack (IPv4 and IPv6) boxes it talks
|
|
||||||
both protocols and can even act as IPv6-to-IPv4 or IPv4-to-IPv6 forwarder.
|
|
||||||
</LI>
|
|
||||||
<LI>
|
|
||||||
Dnsmasq can be configured to send queries for certain domains to
|
|
||||||
upstream servers handling only those domains. This makes integration
|
|
||||||
with private DNS systems easy.
|
|
||||||
</LI>
|
|
||||||
<LI>
|
|
||||||
Dnsmasq supports MX and SRV records and can be configured to return MX records
|
|
||||||
for any or all local machines.
|
|
||||||
</LI>
|
|
||||||
</DIR>
|
</DIR>
|
||||||
|
<P>
|
||||||
|
The DHCP subsystem supports DHCPv4, DHCPv6, BOOTP and PXE.
|
||||||
|
<DIR>
|
||||||
|
<LI> Both static and dynamic DHCP leases are supported, along with stateless mode in DHCPv6.</LI>
|
||||||
|
<LI> The PXE system is a full PXE server, supporting netboot menus and multiple architecture support. It
|
||||||
|
includes proxy-mode, where the PXE system co-operates with another DHCP server.</LI>
|
||||||
|
<LI> There is a built in read-only TFTP server to support netboot.</LI>
|
||||||
|
<LI> Machines which are configured by DHCP have their names automatically
|
||||||
|
included in the DNS and the names can specified by each machine or
|
||||||
|
centrally by associating a name with a MAC address or UID in the dnsmasq
|
||||||
|
configuration file.</LI>
|
||||||
|
</DIR>
|
||||||
|
<P>
|
||||||
|
The Router Advertisement subsystem provides basic autoconfiguration for IPv6 hosts. It can be used stand-alone or in conjunction with DHCPv6.
|
||||||
|
<DIR>
|
||||||
|
<LI> The M and O bits are configurable, to control hosts' use of DHCPv6.</LI>
|
||||||
|
<LI> Router advertisements can include the RDNSS option.</LI>
|
||||||
|
<LI> There is a mode which uses name information from DHCPv4 configuration to provide DNS entries
|
||||||
|
for autoconfigured IPv6 addresses which would otherwise be anonymous.</LI>
|
||||||
|
</DIR>
|
||||||
|
<P>
|
||||||
|
|
||||||
|
For extra compactness, unused features may be omitted at compile time.
|
||||||
|
|
||||||
|
|
||||||
<H2>Get code.</H2>
|
<H2>Get code.</H2>
|
||||||
|
|
||||||
@@ -102,7 +68,7 @@ the repo, or get a copy using git protocol with the command
|
|||||||
<PRE><TT>git clone git://thekelleys.org.uk/dnsmasq.git </TT></PRE>
|
<PRE><TT>git clone git://thekelleys.org.uk/dnsmasq.git </TT></PRE>
|
||||||
|
|
||||||
<H2>License.</H2>
|
<H2>License.</H2>
|
||||||
Dnsmasq is distributed under the GPL. See the file COPYING in the distribution
|
Dnsmasq is distributed under the GPL, version 2 or version 3 at your discretion. See the files COPYING and COPYING-v3 in the distribution
|
||||||
for details.
|
for details.
|
||||||
|
|
||||||
<H2>Contact.</H2>
|
<H2>Contact.</H2>
|
||||||
@@ -110,7 +76,21 @@ There is a dnsmasq mailing list at <A
|
|||||||
HREF="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss">
|
HREF="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss">
|
||||||
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</A> which should be the
|
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</A> which should be the
|
||||||
first location for queries, bugreports, suggestions etc.
|
first location for queries, bugreports, suggestions etc.
|
||||||
Dnsmasq was written by Simon Kelley. You can contact me at <A
|
You can contact me at <A
|
||||||
HREF="mailto:simon@thekelleys.org.uk">simon@thekelleys.org.uk</A>.
|
HREF="mailto:simon@thekelleys.org.uk">simon@thekelleys.org.uk</A>.
|
||||||
|
|
||||||
|
<H2>Donations.</H2>
|
||||||
|
Dnsmasq is mainly written and maintained by Simon Kelley. For most of its life, dnsmasq has been a spare-time project.
|
||||||
|
These days I'm working on it as my main activity.
|
||||||
|
I don't have an employer or anyone who pays me regularly to work on dnsmasq. If you'd like to make
|
||||||
|
a contribution towards my expenses, please use the donation button below.
|
||||||
|
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
|
||||||
|
<input type="hidden" name="cmd" value="_s-xclick">
|
||||||
|
<input type="hidden" name="hosted_button_id" value="V3X9GVW5GX6DA">
|
||||||
|
<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
|
||||||
|
<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
|
||||||
</BODY>
|
</BODY>
|
||||||
|
|
||||||
+2
-2
@@ -675,7 +675,7 @@ Interface-name and address-literal subnet specifications may be used
|
|||||||
freely in the same --auth-zone declaration.
|
freely in the same --auth-zone declaration.
|
||||||
|
|
||||||
The subnet(s) are also used to define in-addr.arpa and
|
The subnet(s) are also used to define in-addr.arpa and
|
||||||
ipv6.arpa domains which are served for reverse-DNS queries. If not
|
ip6.arpa domains which are served for reverse-DNS queries. If not
|
||||||
specified, the prefix length defaults to 24 for IPv4 and 64 for IPv6.
|
specified, the prefix length defaults to 24 for IPv4 and 64 for IPv6.
|
||||||
For IPv4 subnets, the prefix length should be have the value 8, 16 or 24
|
For IPv4 subnets, the prefix length should be have the value 8, 16 or 24
|
||||||
unless you are familiar with RFC 2317 and have arranged the
|
unless you are familiar with RFC 2317 and have arranged the
|
||||||
@@ -2033,7 +2033,7 @@ to particular hosts then
|
|||||||
will do so.
|
will do so.
|
||||||
|
|
||||||
Dnsmasq acts as an authoritative server for in-addr.arpa and
|
Dnsmasq acts as an authoritative server for in-addr.arpa and
|
||||||
ipv6.arpa domains associated with the subnets given in auth-zone
|
ip6.arpa domains associated with the subnets given in auth-zone
|
||||||
declarations, so reverse (address to name) lookups can be simply
|
declarations, so reverse (address to name) lookups can be simply
|
||||||
configured with a suitable NS record, for instance in this example,
|
configured with a suitable NS record, for instance in this example,
|
||||||
where we allow 1.2.3.0/24 addresses.
|
where we allow 1.2.3.0/24 addresses.
|
||||||
|
|||||||
+2
-2
@@ -706,7 +706,7 @@ l'un des sous-réseaux définis, ou dans un réseau correspondant à une plage D
|
|||||||
(ce comportement peut-être désactivé par
|
(ce comportement peut-être désactivé par
|
||||||
.B constructor-noauth:
|
.B constructor-noauth:
|
||||||
). Le ou les sous-réseaux sont également utilisé(s) pour définir les domaines
|
). Le ou les sous-réseaux sont également utilisé(s) pour définir les domaines
|
||||||
in-addr.arpa et ipv6.arpa servant à l'interrogation DNS inverse. Si la longueur
|
in-addr.arpa et ip6.arpa servant à l'interrogation DNS inverse. Si la longueur
|
||||||
de préfixe n'est pas spécifiée, elle sera par défaut de 24 pour IPv4 et 64 pour
|
de préfixe n'est pas spécifiée, elle sera par défaut de 24 pour IPv4 et 64 pour
|
||||||
IPv6. Dans le cas d'IPv4, la longueur du masque de réseau devrait-être de 8, 16
|
IPv6. Dans le cas d'IPv4, la longueur du masque de réseau devrait-être de 8, 16
|
||||||
ou 24, sauf si en cas de mise en place d'une délégation de la zone in-addr.arpa
|
ou 24, sauf si en cas de mise en place d'une délégation de la zone in-addr.arpa
|
||||||
@@ -2186,7 +2186,7 @@ spécifiques, vous pouvez le faire via :
|
|||||||
.fi
|
.fi
|
||||||
|
|
||||||
Dnsmasq joue le rôle de serveur faisant autorité pour les domaines in-addr.arpa
|
Dnsmasq joue le rôle de serveur faisant autorité pour les domaines in-addr.arpa
|
||||||
et ipv6.arpa associés aux sous-réseaux définis dans la déclaration de zone
|
et ip6.arpa associés aux sous-réseaux définis dans la déclaration de zone
|
||||||
auth-zone, ce qui fait que les requêtes DNS inversées (de l'adresse vers
|
auth-zone, ce qui fait que les requêtes DNS inversées (de l'adresse vers
|
||||||
le nom) peuvent-simplement être configurées avec un enregistrement NS
|
le nom) peuvent-simplement être configurées avec un enregistrement NS
|
||||||
adéquat. Par exemple, comme nous définissons plus haut les adresses
|
adéquat. Par exemple, comme nous définissons plus haut les adresses
|
||||||
|
|||||||
+4
-2
@@ -231,8 +231,10 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
|
|||||||
|
|
||||||
} while ((crecp = cache_find_by_addr(crecp, &addr, now, flag)));
|
} while ((crecp = cache_find_by_addr(crecp, &addr, now, flag)));
|
||||||
|
|
||||||
if (!found)
|
if (found)
|
||||||
log_query(flag | F_NEG | F_NXDOMAIN | F_REVERSE | F_AUTH, NULL, &addr, NULL);
|
nxdomain = 0;
|
||||||
|
else
|
||||||
|
log_query(flag | F_NEG | F_NXDOMAIN | F_REVERSE | (auth ? F_AUTH : 0), NULL, &addr, NULL);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-4
@@ -2132,7 +2132,7 @@ static int check_rrs(unsigned char *p, struct dns_header *header, size_t plen, i
|
|||||||
int i, type, class, rdlen;
|
int i, type, class, rdlen;
|
||||||
unsigned char *pp;
|
unsigned char *pp;
|
||||||
|
|
||||||
for (i = 0; i < ntohs(header->ancount) + ntohs(header->nscount); i++)
|
for (i = 0; i < ntohs(header->ancount) + ntohs(header->nscount) + ntohs(header->arcount); i++)
|
||||||
{
|
{
|
||||||
pp = p;
|
pp = p;
|
||||||
|
|
||||||
@@ -2178,7 +2178,7 @@ size_t filter_rrsigs(struct dns_header *header, size_t plen)
|
|||||||
static int rr_sz = 0;
|
static int rr_sz = 0;
|
||||||
|
|
||||||
unsigned char *p = (unsigned char *)(header+1);
|
unsigned char *p = (unsigned char *)(header+1);
|
||||||
int i, rdlen, qtype, qclass, rr_found, chop_an, chop_ns;
|
int i, rdlen, qtype, qclass, rr_found, chop_an, chop_ns, chop_ar;
|
||||||
|
|
||||||
if (ntohs(header->qdcount) != 1 ||
|
if (ntohs(header->qdcount) != 1 ||
|
||||||
!(p = skip_name(p, header, plen, 4)))
|
!(p = skip_name(p, header, plen, 4)))
|
||||||
@@ -2189,7 +2189,9 @@ size_t filter_rrsigs(struct dns_header *header, size_t plen)
|
|||||||
|
|
||||||
/* First pass, find pointers to start and end of all the records we wish to elide:
|
/* First pass, find pointers to start and end of all the records we wish to elide:
|
||||||
records added for DNSSEC, unless explicity queried for */
|
records added for DNSSEC, unless explicity queried for */
|
||||||
for (rr_found = 0, chop_ns = 0, chop_an = 0, i = 0; i < ntohs(header->ancount) + ntohs(header->nscount); i++)
|
for (rr_found = 0, chop_ns = 0, chop_an = 0, chop_ar = 0, i = 0;
|
||||||
|
i < ntohs(header->ancount) + ntohs(header->nscount) + ntohs(header->arcount);
|
||||||
|
i++)
|
||||||
{
|
{
|
||||||
unsigned char *pstart = p;
|
unsigned char *pstart = p;
|
||||||
int type, class;
|
int type, class;
|
||||||
@@ -2217,8 +2219,10 @@ size_t filter_rrsigs(struct dns_header *header, size_t plen)
|
|||||||
|
|
||||||
if (i < ntohs(header->ancount))
|
if (i < ntohs(header->ancount))
|
||||||
chop_an++;
|
chop_an++;
|
||||||
else
|
else if (i < ntohs(header->nscount))
|
||||||
chop_ns++;
|
chop_ns++;
|
||||||
|
else
|
||||||
|
chop_ar++;
|
||||||
}
|
}
|
||||||
else if (!ADD_RDLEN(header, p, plen, rdlen))
|
else if (!ADD_RDLEN(header, p, plen, rdlen))
|
||||||
return plen;
|
return plen;
|
||||||
@@ -2255,6 +2259,7 @@ size_t filter_rrsigs(struct dns_header *header, size_t plen)
|
|||||||
plen = p - (unsigned char *)header;
|
plen = p - (unsigned char *)header;
|
||||||
header->ancount = htons(ntohs(header->ancount) - chop_an);
|
header->ancount = htons(ntohs(header->ancount) - chop_an);
|
||||||
header->nscount = htons(ntohs(header->nscount) - chop_ns);
|
header->nscount = htons(ntohs(header->nscount) - chop_ns);
|
||||||
|
header->arcount = htons(ntohs(header->arcount) - chop_ar);
|
||||||
|
|
||||||
/* Fourth pass, fix up pointers in the remaining records */
|
/* Fourth pass, fix up pointers in the remaining records */
|
||||||
p = (unsigned char *)(header+1);
|
p = (unsigned char *)(header+1);
|
||||||
|
|||||||
+4
-1
@@ -535,6 +535,8 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server
|
|||||||
(void) do_bit;
|
(void) do_bit;
|
||||||
|
|
||||||
#ifdef HAVE_IPSET
|
#ifdef HAVE_IPSET
|
||||||
|
if (daemon->ipsets && extract_request(header, n, daemon->namebuff, NULL))
|
||||||
|
{
|
||||||
/* Similar algorithm to search_servers. */
|
/* Similar algorithm to search_servers. */
|
||||||
struct ipsets *ipset_pos;
|
struct ipsets *ipset_pos;
|
||||||
unsigned int namelen = strlen(daemon->namebuff);
|
unsigned int namelen = strlen(daemon->namebuff);
|
||||||
@@ -551,6 +553,7 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server
|
|||||||
sets = ipset_pos->sets;
|
sets = ipset_pos->sets;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If upstream is advertising a larger UDP packet size
|
/* If upstream is advertising a larger UDP packet size
|
||||||
@@ -1742,7 +1745,7 @@ unsigned char *tcp_request(int confd, time_t now,
|
|||||||
struct server *firstsendto = NULL;
|
struct server *firstsendto = NULL;
|
||||||
#ifdef HAVE_DNSSEC
|
#ifdef HAVE_DNSSEC
|
||||||
unsigned char *newhash, hash[HASH_SIZE];
|
unsigned char *newhash, hash[HASH_SIZE];
|
||||||
if ((newhash = hash_questions(header, (unsigned int)size, daemon->keyname)))
|
if ((newhash = hash_questions(header, (unsigned int)size, daemon->namebuff)))
|
||||||
memcpy(hash, newhash, HASH_SIZE);
|
memcpy(hash, newhash, HASH_SIZE);
|
||||||
else
|
else
|
||||||
memset(hash, 0, HASH_SIZE);
|
memset(hash, 0, HASH_SIZE);
|
||||||
|
|||||||
+1
-1
@@ -1103,7 +1103,7 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t
|
|||||||
ipsets_cur = ipsets;
|
ipsets_cur = ipsets;
|
||||||
while (*ipsets_cur)
|
while (*ipsets_cur)
|
||||||
{
|
{
|
||||||
log_query(F_IPSET, name, &addr, *ipsets_cur);
|
log_query((flags & (F_IPV4 | F_IPV6)) | F_IPSET, name, &addr, *ipsets_cur);
|
||||||
add_to_ipset(*ipsets_cur++, &addr, flags, 0);
|
add_to_ipset(*ipsets_cur++, &addr, flags, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user