Compare commits

..
18 Commits
Author SHA1 Message Date
Simon Kelley 74ea91531a Fix typo and format in CHANGELOG 2017-05-22 22:58:46 +01:00
Matthias Andree 9828ab115e Fix compiler warning. 2017-05-21 22:41:16 +01:00
Matthias Andree f77700aa27 Fix compiler warning. 2017-05-21 22:36:09 +01:00
Simon Kelley 0fbd980639 Fix compiler warning. 2017-05-21 22:24:43 +01:00
Simon Kelley 43cdf1c3d0 Remove automatic IDN support when building i18n.
Remove historic automatic inclusion of IDN support when
building internationalisation support. This doesn't
fit now there is a choice of IDN libraries. Be sure
to include either -DHAVE_IDN or _DHAVE_LIBIDN2 for
IDN support
2017-05-21 22:12:44 +01:00
Simon Kelley ff19b1a97d Fix &/&& confusion. 2017-05-21 21:15:32 +01:00
Conrad Kostecki 1835343acd Update German translation. 2017-05-12 15:16:02 +01:00
Simon Kelley 2aaea18f43 Add .gitattributes to substitute VERSION on export. 2017-05-12 13:14:17 +01:00
Simon Kelley 7ab78b937f Fix c7be0164ce 2017-05-11 20:33:21 +01:00
Simon Kelley c7be0164ce Suppress DHCP ping checks when allocating on the loopback interface. 2017-05-10 22:21:53 +01:00
Petr Menšík d203af4a02 Add optional support for libidn2 and therefore IDNA2008. 2017-05-10 21:41:57 +01:00
Simon Kelley 05f76dab89 Don't die() on failing to parse lease-script output. 2017-05-09 22:57:04 +01:00
Simon Kelley bf05f8ff20 Fix crash introduced by 09f3b2cd9c. 2017-05-09 22:37:46 +01:00
Simon Kelley 09f3b2cd9c Fix case of DS queries to domains marked as not doing DNSSEC.
This was causing confusion: DNSSEC queries would be sent to
servers for domains that don't do DNSSEC, but because of that status
the answers would be treated as answers to ordinary queries,
sometimes resulting in a crash.
2017-05-09 01:34:02 +01:00
Simon Kelley 22827870fa Fix botch introduced by 561441320f 2017-05-08 21:39:04 +01:00
Vladislav Grishenko 4583dd9e42 Replace obsolete utime() usage with utimes().
This fixes build time warnings with POSIX.1-2008-aware c libraries.
2017-05-03 23:16:51 +01:00
Simon Kelley 561441320f Fix a couple of crashes on malformed config files.
Thanks to Stephan Zeisberg and
american fuzzy lop http://lcamtuf.coredump.cx/afl/
2017-05-03 22:54:09 +01:00
Simon Kelley b2a9c571eb Add "known-othernet" DHCP tag. 2017-04-30 18:21:31 +01:00
18 changed files with 407 additions and 364 deletions

No files matched your search

+1
View File
@@ -0,0 +1 @@
VERSION export-subst
+224 -213
View File
@@ -21,8 +21,8 @@ version 2.77
Thanks to Ivan Kokshaysky for the diagnosis and Thanks to Ivan Kokshaysky for the diagnosis and
patch. patch.
Fix problem with --dnssec-timestamp whereby receipt Fix problem with --dnssec-timestamp whereby receipt
of SIGHUP would erroneously engage timestamp checking. of SIGHUP would erroneously engage timestamp checking.
Thanks to Kevin Darbyshire-Bryant for this work. Thanks to Kevin Darbyshire-Bryant for this work.
Bump zone serial on reloading /etc/hosts and friends Bump zone serial on reloading /etc/hosts and friends
@@ -58,19 +58,19 @@ version 2.77
this is Nominum's. Thanks to Dave Täht for spotting the this is Nominum's. Thanks to Dave Täht for spotting the
bug and assisting in the fix. bug and assisting in the fix.
Fix the manpage which lied that only the primary address Fix the manpage which lied that only the primary address
of an interface is used by --interface-name. of an interface is used by --interface-name.
Make --localise-queries apply to names from --interface-name. Make --localise-queries apply to names from --interface-name.
Thanks to Kevin Darbyshire-Bryant and Eric Luehrsen Thanks to Kevin Darbyshire-Bryant and Eric Luehrsen
for pushing this. for pushing this.
Improve connection handling when talking to TCP upstream Improve connection handling when talking to TCP upstream
servers. Specifically, be prepared to open a new TCP servers. Specifically, be prepared to open a new TCP
connection when we want to make multiple queries connection when we want to make multiple queries
but the upstream server accepts fewer queries per connection. but the upstream server accepts fewer queries per connection.
Improve logging of upstream servers when there are a lot Improve logging of upstream servers when there are a lot
of "local addresses only" entries. Thanks to Hannu Nyman for of "local addresses only" entries. Thanks to Hannu Nyman for
the patch. the patch.
@@ -80,10 +80,10 @@ version 2.77
Allow use of MAC addresses with --tftp-unique-root. Thanks Allow use of MAC addresses with --tftp-unique-root. Thanks
to Floris Bos for the patch. to Floris Bos for the patch.
Add --dhcp-reply-delay option. Thanks to Floris Bos Add --dhcp-reply-delay option. Thanks to Floris Bos
for the patch. for the patch.
Add mtu setting facility to --ra-param. Thanks to David Add mtu setting facility to --ra-param. Thanks to David
Flamand for the patch. Flamand for the patch.
Capture STDOUT and STDERR output from dhcp-script and log Capture STDOUT and STDERR output from dhcp-script and log
@@ -93,33 +93,44 @@ version 2.77
Generate fatal errors when failing to parse the output Generate fatal errors when failing to parse the output
of the dhcp-script in "init" mode. Avoids strange errors of the dhcp-script in "init" mode. Avoids strange errors
when the script accidentally emits error messages. when the script accidentally emits error messages.
Thanks to Petr Mensik for the patch. Thanks to Petr Mensik for the patch.
Make --rev-server for an RFC1918 subnet work even in the Make --rev-server for an RFC1918 subnet work even in the
presence of the --bogus-priv flag. Thanks to presence of the --bogus-priv flag. Thanks to
Vladislav Grishenko for the patch. Vladislav Grishenko for the patch.
Extend --ra-param mtu: field to allow an interface name. Extend --ra-param mtu: field to allow an interface name.
This allows the MTU of a WAN interface to be advertised on This allows the MTU of a WAN interface to be advertised on
the internal interfaces of a router. Thanks to the internal interfaces of a router. Thanks to
Vladislav Grishenko for the patch. Vladislav Grishenko for the patch.
Do ICMP-ping check for address-in-use for DHCPv4 when Do ICMP-ping check for address-in-use for DHCPv4 when
the client specifies an address in DHCPDISCOVER, and when the client specifies an address in DHCPDISCOVER, and when
an address in configured locally. Thanks to Alin Năstac an address in configured locally. Thanks to Alin Năstac
for spotting the problem. for spotting the problem.
Add new DHCP tag "known-othernet" which is set when only a
dhcp-host exists for another subnet. Can be used to ensure
that privileged hosts are not given "guest" addresses by
accident. Thanks to Todd Sanket for the suggestion.
Remove historic automatic inclusion of IDN support when
building internationalisation support. This doesn't
fit now there is a choice of IDN libraries. Be sure
to include either -DHAVE_IDN or -DHAVE_LIBIDN2 for
IDN support.
version 2.76 version 2.76
Include 0.0.0.0/8 in DNS rebind checks. This range Include 0.0.0.0/8 in DNS rebind checks. This range
translates to hosts on the local network, or, at translates to hosts on the local network, or, at
least, 0.0.0.0 accesses the local host, so could least, 0.0.0.0 accesses the local host, so could
be targets for DNS rebinding. See RFC 5735 section 3 be targets for DNS rebinding. See RFC 5735 section 3
for details. Thanks to Stephen Röttger for the bug report. for details. Thanks to Stephen Röttger for the bug report.
Enhance --add-subnet to allow arbitrary subnet addresses. Enhance --add-subnet to allow arbitrary subnet addresses.
Thanks to Ed Barsley for the patch. Thanks to Ed Barsley for the patch.
Respect the --no-resolv flag in inotify code. Fixes bug Respect the --no-resolv flag in inotify code. Fixes bug
which caused dnsmasq to fail to start if a resolv-file which caused dnsmasq to fail to start if a resolv-file
@@ -144,7 +155,7 @@ version 2.76
Return REFUSED when running out of forwarding table slots, Return REFUSED when running out of forwarding table slots,
not SERVFAIL. not SERVFAIL.
Add --max-port configuration. Thanks to Hans Dedecker for Add --max-port configuration. Thanks to Hans Dedecker for
the patch. the patch.
Add --script-arp and two new functions for the dhcp-script. Add --script-arp and two new functions for the dhcp-script.
@@ -156,7 +167,7 @@ version 2.76
Add --add-cpe-id option. Add --add-cpe-id option.
Don't crash with divide-by-zero if an IPv6 dhcp-range Don't crash with divide-by-zero if an IPv6 dhcp-range
is declared as a whole /64. is declared as a whole /64.
(ie xx::0 to xx::ffff:ffff:ffff:ffff) (ie xx::0 to xx::ffff:ffff:ffff:ffff)
Thanks to Laurent Bendel for spotting this problem. Thanks to Laurent Bendel for spotting this problem.
@@ -197,7 +208,7 @@ version 2.76
Add ARM32_EFI and ARM64_EFI as valid architectures in Add ARM32_EFI and ARM64_EFI as valid architectures in
--pxe-service. --pxe-service.
Fix PXE booting for UEFI architectures. Modify PXE boot Fix PXE booting for UEFI architectures. Modify PXE boot
sequence in this case to force the client to talk to dnsmasq sequence in this case to force the client to talk to dnsmasq
over port 4011. This makes PXE and especially proxy-DHCP PXE over port 4011. This makes PXE and especially proxy-DHCP PXE
work with these architectures. work with these architectures.
@@ -209,7 +220,7 @@ version 2.76
will be booted directly, rather then sending a will be booted directly, rather then sending a
single-item boot menu. single-item boot menu.
Many thanks to Jarek Polok, Michael Kuron and Dreamcat4 Many thanks to Jarek Polok, Michael Kuron and Dreamcat4
for their work on the long-standing UEFI PXE problem. for their work on the long-standing UEFI PXE problem.
Subtle change in the semantics of "basename" in Subtle change in the semantics of "basename" in
@@ -232,13 +243,13 @@ version 2.76
version 2.75 version 2.75
Fix reversion on 2.74 which caused 100% CPU use when a Fix reversion on 2.74 which caused 100% CPU use when a
dhcp-script is configured. Thanks to Adrian Davey for dhcp-script is configured. Thanks to Adrian Davey for
reporting the bug and testing the fix. reporting the bug and testing the fix.
version 2.74 version 2.74
Fix reversion in 2.73 where --conf-file would attempt to Fix reversion in 2.73 where --conf-file would attempt to
read the default file, rather than no file. read the default file, rather than no file.
Fix inotify code to handle dangling symlinks better and Fix inotify code to handle dangling symlinks better and
@@ -246,11 +257,11 @@ version 2.74
DNSSEC fix. In the case of a signed CNAME generated by a DNSSEC fix. In the case of a signed CNAME generated by a
wildcard which pointed to an unsigned domain, the wrong wildcard which pointed to an unsigned domain, the wrong
status would be logged, and some necessary checks omitted. status would be logged, and some necessary checks omitted.
version 2.73 version 2.73
Fix crash at startup when an empty suffix is supplied to Fix crash at startup when an empty suffix is supplied to
--conf-dir, also trivial memory leak. Thanks to --conf-dir, also trivial memory leak. Thanks to
Tomas Hozza for spotting this. Tomas Hozza for spotting this.
@@ -282,7 +293,7 @@ version 2.73
reply. This is useful to defeat blocking strategies which reply. This is useful to defeat blocking strategies which
rely on quickly supplying a forged answer to a DNS rely on quickly supplying a forged answer to a DNS
request for certain domains, before the correct answer can request for certain domains, before the correct answer can
arrive. Thanks to Glen Huang for the patch. arrive. Thanks to Glen Huang for the patch.
Revisit the part of DNSSEC validation which determines if an Revisit the part of DNSSEC validation which determines if an
unsigned answer is legit, or is in some part of the DNS unsigned answer is legit, or is in some part of the DNS
@@ -339,7 +350,7 @@ version 2.73
memory to be read by an attacker under certain memory to be read by an attacker under certain
circumstances, so it has a CVE, CVE-2015-3294 circumstances, so it has a CVE, CVE-2015-3294
Fix crash in authoritative DNS code, if a .arpa zone Fix crash in authoritative DNS code, if a .arpa zone
is declared as authoritative, and then a PTR query which is declared as authoritative, and then a PTR query which
is not to be treated as authoritative arrived. Normally, is not to be treated as authoritative arrived. Normally,
directly declaring .arpa zone as authoritative is not directly declaring .arpa zone as authoritative is not
@@ -354,7 +365,7 @@ version 2.73
Previously we provided correct answers to PTR queries Previously we provided correct answers to PTR queries
in such zones (including NS and SOA) but not direct in such zones (including NS and SOA) but not direct
NS and SOA queries. Thanks to Johnny S. Lee for NS and SOA queries. Thanks to Johnny S. Lee for
pointing out the problem. pointing out the problem.
Fix logging of DHCPREPLY which should be suppressed Fix logging of DHCPREPLY which should be suppressed
by quiet-dhcp6. Thanks to J. Pablo Abonia for by quiet-dhcp6. Thanks to J. Pablo Abonia for
@@ -362,7 +373,7 @@ version 2.73
Try and handle net connections with broken fragmentation Try and handle net connections with broken fragmentation
that lose large UDP packets. If a server times out, that lose large UDP packets. If a server times out,
reduce the maximum UDP packet size field in the EDNS0 reduce the maximum UDP packet size field in the EDNS0
header to 1280 bytes. If it then answers, make that header to 1280 bytes. If it then answers, make that
change permanent. change permanent.
@@ -372,7 +383,7 @@ version 2.73
Allow DHCPv4 options T1 and T2 to be set using --dhcp-option. Allow DHCPv4 options T1 and T2 to be set using --dhcp-option.
Thanks to Kevin Benton for patches and work on this. Thanks to Kevin Benton for patches and work on this.
Fix code for DHCPCONFIRM DHCPv6 messages to confirm addresses Fix code for DHCPCONFIRM DHCPv6 messages to confirm addresses
in the correct subnet, even of not in dynamic address in the correct subnet, even of not in dynamic address
allocation range. Thanks to Steve Hirsch for spotting allocation range. Thanks to Steve Hirsch for spotting
the problem. the problem.
@@ -388,7 +399,7 @@ version 2.73
version 2.72 version 2.72
Add ra-advrouter mode, for RFC-3775 mobile IPv6 support. Add ra-advrouter mode, for RFC-3775 mobile IPv6 support.
Add support for "ipsets" in *BSD, using pf. Thanks to Add support for "ipsets" in *BSD, using pf. Thanks to
Sven Falempin for the patch. Sven Falempin for the patch.
@@ -420,19 +431,19 @@ version 2.72
--conf-dir=/etc/dnsmasq.d,\*.conf --conf-dir=/etc/dnsmasq.d,\*.conf
will load all the files in /etc/dnsmasq.d which end in .conf will load all the files in /etc/dnsmasq.d which end in .conf
Fix bug when resulted in NXDOMAIN answers instead of NODATA in Fix bug when resulted in NXDOMAIN answers instead of NODATA in
some circumstances. some circumstances.
Fix bug which caused dnsmasq to become unresponsive if it Fix bug which caused dnsmasq to become unresponsive if it
failed to send packets due to a network interface disappearing. failed to send packets due to a network interface disappearing.
Thanks to Niels Peen for spotting this. Thanks to Niels Peen for spotting this.
Fix problem with --local-service option on big-endian platforms Fix problem with --local-service option on big-endian platforms
Thanks to Richard Genoud for the patch. Thanks to Richard Genoud for the patch.
version 2.71 version 2.71
Subtle change to error handling to help DNSSEC validation Subtle change to error handling to help DNSSEC validation
when servers fail to provide NODATA answers for when servers fail to provide NODATA answers for
non-existent DS records. non-existent DS records.
@@ -450,7 +461,7 @@ version 2.71
version 2.70 version 2.70
Fix crash, introduced in 2.69, on TCP request when dnsmasq Fix crash, introduced in 2.69, on TCP request when dnsmasq
compiled with DNSSEC support, but running without DNSSEC compiled with DNSSEC support, but running without DNSSEC
enabled. Thanks to Manish Sing for spotting that one. enabled. Thanks to Manish Sing for spotting that one.
@@ -558,12 +569,12 @@ version 2.69
full access to configuration. full access to configuration.
Add --local-service. Accept DNS queries only from hosts Add --local-service. Accept DNS queries only from hosts
whose address is on a local subnet, ie a subnet for which whose address is on a local subnet, ie a subnet for which
an interface exists on the server. This option an interface exists on the server. This option
only has effect if there are no --interface --except-interface, only has effect if there are no --interface --except-interface,
--listen-address or --auth-server options. It is intended --listen-address or --auth-server options. It is intended
to be set as a default on installation, to allow to be set as a default on installation, to allow
unconfigured installations to be useful but also safe from unconfigured installations to be useful but also safe from
being used for DNS amplification attacks. being used for DNS amplification attacks.
Fix crashes in cache_get_cname_target() when dangling CNAMEs Fix crashes in cache_get_cname_target() when dangling CNAMEs
@@ -579,9 +590,9 @@ version 2.69
version 2.68 version 2.68
Use random addresses for DHCPv6 temporary address Use random addresses for DHCPv6 temporary address
allocations, instead of algorithmically determined stable allocations, instead of algorithmically determined stable
addresses. addresses.
Fix bug which meant that the DHCPv6 DUID was not available Fix bug which meant that the DHCPv6 DUID was not available
in DHCP script runs during the lifetime of the dnsmasq in DHCP script runs during the lifetime of the dnsmasq
@@ -720,7 +731,7 @@ version 2.67
Support RFC-4242 information-refresh-time options in the Support RFC-4242 information-refresh-time options in the
reply to DHCPv6 information-request. The lease time of the reply to DHCPv6 information-request. The lease time of the
smallest valid dhcp-range is sent. Thanks to Uwe Schindler smallest valid dhcp-range is sent. Thanks to Uwe Schindler
for suggesting this. for suggesting this.
Make --listen-address higher priority than --except-interface Make --listen-address higher priority than --except-interface
@@ -761,7 +772,7 @@ version 2.67
Fix problem in DHCPv6 vendorclass/userclass matching Fix problem in DHCPv6 vendorclass/userclass matching
code. Thanks to Tanguy Bouzeloc for the patch. code. Thanks to Tanguy Bouzeloc for the patch.
Update Spanish translation. Thanks to Vicente Soriano. Update Spanish translation. Thanks to Vicente Soriano.
Add --ra-param option. Thanks to Vladislav Grishenko for Add --ra-param option. Thanks to Vladislav Grishenko for
inspiration on this. inspiration on this.
@@ -787,12 +798,12 @@ version 2.67
version 2.66 version 2.66
Add the ability to act as an authoritative DNS Add the ability to act as an authoritative DNS
server. Dnsmasq can now answer queries from the wider 'net server. Dnsmasq can now answer queries from the wider 'net
with local data, as long as the correct NS records are set with local data, as long as the correct NS records are set
up. Only local data is provided, to avoid creating an open up. Only local data is provided, to avoid creating an open
DNS relay. Zone transfer is supported, to allow secondary DNS relay. Zone transfer is supported, to allow secondary
servers to be configured. servers to be configured.
Add "constructed DHCP ranges" for DHCPv6. This is intended Add "constructed DHCP ranges" for DHCPv6. This is intended
for IPv6 routers which get prefixes dynamically via prefix for IPv6 routers which get prefixes dynamically via prefix
@@ -819,12 +830,12 @@ version 2.66
the local DNS server if dnsmasq is configured to not act the local DNS server if dnsmasq is configured to not act
as DNS server, or it's configured to a non-standard port. as DNS server, or it's configured to a non-standard port.
Add DNSMASQ_CIRCUIT_ID, DNSMASQ_SUBSCRIBER_ID, Add DNSMASQ_CIRCUIT_ID, DNSMASQ_SUBSCRIBER_ID,
DNSMASQ_REMOTE_ID variables to the environment of the DNSMASQ_REMOTE_ID variables to the environment of the
lease-change script (and the corresponding Lua). These hold lease-change script (and the corresponding Lua). These hold
information inserted into the DHCP request by a DHCP relay information inserted into the DHCP request by a DHCP relay
agent. Thanks to Lakefield Communications for providing a agent. Thanks to Lakefield Communications for providing a
bounty for this addition. bounty for this addition.
Fixed crash, introduced in 2.64, whilst handling DHCPv6 Fixed crash, introduced in 2.64, whilst handling DHCPv6
information-requests with some common configurations. information-requests with some common configurations.
@@ -866,9 +877,9 @@ version 2.65
version 2.64 version 2.64
Handle DHCP FQDN options with all flag bits zero and Handle DHCP FQDN options with all flag bits zero and
--dhcp-client-update set. Thanks to Bernd Krumbroeck for --dhcp-client-update set. Thanks to Bernd Krumbroeck for
spotting the problem. spotting the problem.
Finesse the check for /etc/hosts names which conflict with Finesse the check for /etc/hosts names which conflict with
DHCP names. Previously a name/address pair in /etc/hosts DHCP names. Previously a name/address pair in /etc/hosts
@@ -937,7 +948,7 @@ version 2.64
version 2.63 version 2.63
Do duplicate dhcp-host address check in --test mode. Do duplicate dhcp-host address check in --test mode.
Check that tftp-root directories are accessible before Check that tftp-root directories are accessible before
start-up. Thanks to Daniel Veillard for the initial patch. start-up. Thanks to Daniel Veillard for the initial patch.
@@ -967,7 +978,7 @@ version 2.63
Allow the target of a --cname flag to be another --cname. Allow the target of a --cname flag to be another --cname.
Teach DHCPv6 about the RFC 4242 information-refresh-time Teach DHCPv6 about the RFC 4242 information-refresh-time
option, and add parsing if the minutes, hours and days option, and add parsing if the minutes, hours and days
format for options. Thanks to Francois-Xavier Le Bail for format for options. Thanks to Francois-Xavier Le Bail for
the suggestion. the suggestion.
@@ -988,7 +999,7 @@ version 2.63
version 2.62 version 2.62
Update German translation. Thanks to Conrad Kostecki. Update German translation. Thanks to Conrad Kostecki.
Cope with router-solict packets which don't have a valid Cope with router-solict packets which don't have a valid
source address. Thanks to Vladislav Grishenko for the patch. source address. Thanks to Vladislav Grishenko for the patch.
@@ -1019,7 +1030,7 @@ version 2.61
Add ra-names, ra-stateless and slaac keywords for DHCPv6. Add ra-names, ra-stateless and slaac keywords for DHCPv6.
Dnsmasq can now synthesise AAAA records for dual-stack Dnsmasq can now synthesise AAAA records for dual-stack
hosts which get IPv6 addresses via SLAAC. It is also now hosts which get IPv6 addresses via SLAAC. It is also now
possible to use SLAAC and stateless DHCPv6, and to possible to use SLAAC and stateless DHCPv6, and to
tell clients to use SLAAC addresses as well as DHCP ones. tell clients to use SLAAC addresses as well as DHCP ones.
Thanks to Dave Taht for help with this. Thanks to Dave Taht for help with this.
@@ -1077,7 +1088,7 @@ version 2.61
preferred lease time for both DHCP and RA to zero. The preferred lease time for both DHCP and RA to zero. The
effect is that clients can continue to use the address effect is that clients can continue to use the address
for existing connections, but new connections will use for existing connections, but new connections will use
other addresses, if they exist. This makes hitless other addresses, if they exist. This makes hitless
renumbering at least possible. renumbering at least possible.
Fix bug in address6_available() which caused DHCPv6 lease Fix bug in address6_available() which caused DHCPv6 lease
@@ -1119,8 +1130,8 @@ version 2.61
version 2.60 version 2.60
Fix compilation problem in Mac OS X Lion. Thanks to Olaf Fix compilation problem in Mac OS X Lion. Thanks to Olaf
Flebbe for the patch. Flebbe for the patch.
Fix DHCP when using --listen-address with an IP address Fix DHCP when using --listen-address with an IP address
which is not the primary address of an interface. which is not the primary address of an interface.
@@ -1162,7 +1173,7 @@ version 2.60
Allow the TFP server or boot server in --pxe-service, to Allow the TFP server or boot server in --pxe-service, to
be a domain name instead of an IP address. This allows for be a domain name instead of an IP address. This allows for
round-robin to multiple servers, in the same way as round-robin to multiple servers, in the same way as
--dhcp-boot. A good suggestion from Cristiano Cumer. --dhcp-boot. A good suggestion from Cristiano Cumer.
Support BUILDDIR variable in the Makefile. Allows builds Support BUILDDIR variable in the Makefile. Allows builds
@@ -1196,26 +1207,26 @@ version 2.60
via an interface other than the expected one. Thanks to via an interface other than the expected one. Thanks to
Lorenzo Milesi and John Hanks for spotting this one. Lorenzo Milesi and John Hanks for spotting this one.
Update French translation. Thanks to Gildas Le Nadan. Update French translation. Thanks to Gildas Le Nadan.
Update Polish translation. Thanks to Jan Psota. Update Polish translation. Thanks to Jan Psota.
version 2.59 version 2.59
Fix regression in 2.58 which caused failure to start up Fix regression in 2.58 which caused failure to start up
with some combinations of dnsmasq config and IPv6 kernel with some combinations of dnsmasq config and IPv6 kernel
network config. Thanks to Brielle Bruns for the bug network config. Thanks to Brielle Bruns for the bug
report. report.
Improve dnsmasq's behaviour when network interfaces are Improve dnsmasq's behaviour when network interfaces are
still doing duplicate address detection (DAD). Previously, still doing duplicate address detection (DAD). Previously,
dnsmasq would wait up to 20 seconds at start-up for the dnsmasq would wait up to 20 seconds at start-up for the
DAD state to terminate. This is broken for bridge DAD state to terminate. This is broken for bridge
interfaces on recent Linux kernels, which don't start DAD interfaces on recent Linux kernels, which don't start DAD
until the bridge comes up, and so can take arbitrary until the bridge comes up, and so can take arbitrary
time. The new behaviour lets dnsmasq poll for an arbitrary time. The new behaviour lets dnsmasq poll for an arbitrary
time whilst providing service on other interfaces. Thanks time whilst providing service on other interfaces. Thanks
to Stephen Hemminger for pointing out the problem. to Stephen Hemminger for pointing out the problem.
version 2.58 version 2.58
@@ -1285,7 +1296,7 @@ version 2.58
--dhcp-option=tag:interface1,option:nis-domain,"domain1" --dhcp-option=tag:interface1,option:nis-domain,"domain1"
--dhcp-option=tag:myhost,option:nis-domain,"domain2" --dhcp-option=tag:myhost,option:nis-domain,"domain2"
will set the NIS-domain to domain1 for hosts in the range, but will set the NIS-domain to domain1 for hosts in the range, but
override that to domain2 for a particular host. override that to domain2 for a particular host.
Fix bug which resulted in truncated files and timeouts for Fix bug which resulted in truncated files and timeouts for
some TFTP transfers. The bug only occurs with netascii some TFTP transfers. The bug only occurs with netascii
@@ -1327,9 +1338,9 @@ version 2.57
spotting this. spotting this.
Allow build with IDN support independently from i18n. Allow build with IDN support independently from i18n.
IDN support continues to be included automatically IDN support continues to be included automatically
when i18n is included. when i18n is included.
'make COPTS=-DHAVE_IDN' is the magic incantation. 'make COPTS=-DHAVE_IDN' is the magic incantation.
Modify check on extraneous command line junk (added in Modify check on extraneous command line junk (added in
2.56) so that it doesn't complain about extra _empty_ 2.56) so that it doesn't complain about extra _empty_
@@ -1337,8 +1348,8 @@ version 2.57
version 2.56 version 2.56
Add a patch to allow dnsmasq to get interface names right in a Add a patch to allow dnsmasq to get interface names right in a
Solaris zone. Thanks to Dj Padzensky for this. Solaris zone. Thanks to Dj Padzensky for this.
Improve data-type parsing heuristics so that Improve data-type parsing heuristics so that
--dhcp-option=option:domain-search,. --dhcp-option=option:domain-search,.
@@ -1352,9 +1363,9 @@ version 2.56
LOG_DEBUG. This makes things consistent with DHCP LOG_DEBUG. This makes things consistent with DHCP
logging. Thanks to Adam Pribyl for spotting the problem. logging. Thanks to Adam Pribyl for spotting the problem.
Ensure that dnsmasq terminates cleanly when using Ensure that dnsmasq terminates cleanly when using
--syslog-async even if it cannot make a connection to the --syslog-async even if it cannot make a connection to the
syslogd. syslogd.
Add --add-mac option. This is to support currently Add --add-mac option. This is to support currently
experimental DNS filtering facilities. Thanks to Benjamin experimental DNS filtering facilities. Thanks to Benjamin
@@ -1365,7 +1376,7 @@ version 2.56
Cristiano Cumer for spotting this. Cristiano Cumer for spotting this.
Raise an error if there is extra junk, not part of an Raise an error if there is extra junk, not part of an
option, on the command line. option, on the command line.
Flag a couple of log messages in cache.c as coming from Flag a couple of log messages in cache.c as coming from
the DHCP subsystem. Thanks to Olaf Westrik for the patch. the DHCP subsystem. Thanks to Olaf Westrik for the patch.
@@ -1389,7 +1400,7 @@ version 2.56
A good suggestion from Ferenc Wagner: extend A good suggestion from Ferenc Wagner: extend
the --domain option to allow this sort of thing: the --domain option to allow this sort of thing:
--domain=thekelleys.org.uk,192.168.0.0/24,local --domain=thekelleys.org.uk,192.168.0.0/24,local
which automatically creates which automatically creates
--local=/thekelleys.org.uk/ --local=/thekelleys.org.uk/
--local=/0.168.192.in-addr.arpa/ --local=/0.168.192.in-addr.arpa/
@@ -1455,13 +1466,13 @@ version 2.56
request meant for another DHCP server. NAKing this is request meant for another DHCP server. NAKing this is
wrong. Thanks to Brad D'Hondt for assistance with this. wrong. Thanks to Brad D'Hondt for assistance with this.
Fix cosmetic bug which produced strange output when Fix cosmetic bug which produced strange output when
dumping cache statistics with some configurations. Thanks dumping cache statistics with some configurations. Thanks
to Fedor Kozhevnikov for spotting this. to Fedor Kozhevnikov for spotting this.
version 2.55 version 2.55
Fix crash when /etc/ethers is in use. Thanks to Fix crash when /etc/ethers is in use. Thanks to
Gianluigi Tiesi for finding this. Gianluigi Tiesi for finding this.
Fix crash in netlink_multicast(). Thanks to Arno Wald for Fix crash in netlink_multicast(). Thanks to Arno Wald for
@@ -1472,12 +1483,12 @@ version 2.55
version 2.54 version 2.54
There is no version 2.54 to avoid confusion with 2.53, There is no version 2.54 to avoid confusion with 2.53,
which incorrectly identifies itself as 2.54. which incorrectly identifies itself as 2.54.
version 2.53 version 2.53
Fix failure to compile on Debian/kFreeBSD. Thanks to Fix failure to compile on Debian/kFreeBSD. Thanks to
Axel Beckert and Petr Salinger. Axel Beckert and Petr Salinger.
Fix code to avoid scary strict-aliasing warnings Fix code to avoid scary strict-aliasing warnings
@@ -1532,13 +1543,13 @@ version 2.53
Added interface:<iface name> part to dhcp-range. The Added interface:<iface name> part to dhcp-range. The
semantics of this are very odd at first sight, but it semantics of this are very odd at first sight, but it
allows a single line of the form allows a single line of the form
dhcp-range=interface:virt0,192.168.0.4,192.168.0.200 dhcp-range=interface:virt0,192.168.0.4,192.168.0.200
to be added to dnsmasq configuration which then supplies to be added to dnsmasq configuration which then supplies
DHCP and DNS services to that interface, without affecting DHCP and DNS services to that interface, without affecting
what services are supplied to other interfaces and what services are supplied to other interfaces and
irrespective of the existence or lack of irrespective of the existence or lack of
interface=<interface> interface=<interface>
lines elsewhere in the dnsmasq configuration. The idea is lines elsewhere in the dnsmasq configuration. The idea is
that such a line can be added automatically by libvirt that such a line can be added automatically by libvirt
or equivalent systems, without disturbing any manual or equivalent systems, without disturbing any manual
configuration. configuration.
@@ -1551,7 +1562,7 @@ version 2.53
Correctly handle and log clashes between CNAMES and Correctly handle and log clashes between CNAMES and
DNS names being given to DHCP leases. This fixes a bug DNS names being given to DHCP leases. This fixes a bug
which caused nonsense IP addresses to be logged. Thanks to which caused nonsense IP addresses to be logged. Thanks to
Sergei Zhirikov for finding and analysing the problem. Sergei Zhirikov for finding and analysing the problem.
Tweak flush_log so as to avoid leaving the log Tweak flush_log so as to avoid leaving the log
file in non-blocking mode. O_NONBLOCK is a property of the file in non-blocking mode. O_NONBLOCK is a property of the
@@ -1590,14 +1601,14 @@ version 2.53
then adding --bridge-interface=eth0:dhcp,eth0 will use then adding --bridge-interface=eth0:dhcp,eth0 will use
the address of eth0:dhcp to determine the correct subnet the address of eth0:dhcp to determine the correct subnet
for DHCP address allocation. Thanks to Pawel Golaszewski for DHCP address allocation. Thanks to Pawel Golaszewski
for prompting this and Eric Cooper for further testing. for prompting this and Eric Cooper for further testing.
Add --dhcp-generate-names. Suggestion by Ferenc Wagner. Add --dhcp-generate-names. Suggestion by Ferenc Wagner.
Tweak DNS server selection algorithm when there is more Tweak DNS server selection algorithm when there is more
than one server available for a domain, eg. than one server available for a domain, eg.
--server=/mydomain/1.1.1.1 --server=/mydomain/1.1.1.1
--server=/mydomain/2.2.2.2 --server=/mydomain/2.2.2.2
Thanks to Alberto Cuesta-Canada for spotting a weakness Thanks to Alberto Cuesta-Canada for spotting a weakness
here. here.
@@ -1612,7 +1623,7 @@ version 2.53
long time, but it should be accepted for backward long time, but it should be accepted for backward
compatibility. Thanks to Andrew Burcin for spotting this. compatibility. Thanks to Andrew Burcin for spotting this.
Add --rebind-domain-ok and --rebind-localhost-ok. Add --rebind-domain-ok and --rebind-localhost-ok.
Suggestion from Clemens Fischer. Suggestion from Clemens Fischer.
Log replies to queries of type TXT, when --log-queries Log replies to queries of type TXT, when --log-queries
@@ -1621,7 +1632,7 @@ version 2.53
Fix compiler warnings when compiled with -DNO_DHCP. Thanks Fix compiler warnings when compiled with -DNO_DHCP. Thanks
to Shantanu Gadgil for the patch. to Shantanu Gadgil for the patch.
Updated French translation. Thanks to Gildas Le Nadan. Updated French translation. Thanks to Gildas Le Nadan.
Updated Polish translation. Thanks to Jan Psota. Updated Polish translation. Thanks to Jan Psota.
@@ -1633,14 +1644,14 @@ version 2.53
overrides one supplied by a DHCP client. Thanks to Fedor overrides one supplied by a DHCP client. Thanks to Fedor
Kozhevnikov for spotting the problem. Kozhevnikov for spotting the problem.
Updated Spanish translation. Thanks to Chris Chatham. Updated Spanish translation. Thanks to Chris Chatham.
version 2.52 version 2.52
Work around a Linux kernel bug which insists that the Work around a Linux kernel bug which insists that the
length of the option passed to setsockopt must be at least length of the option passed to setsockopt must be at least
sizeof(int) bytes, even if we're calling SO_BINDTODEVICE sizeof(int) bytes, even if we're calling SO_BINDTODEVICE
and the device name is "lo". Note that this is fixed and the device name is "lo". Note that this is fixed
in kernel 2.6.31, but the workaround is harmless and in kernel 2.6.31, but the workaround is harmless and
allows earlier kernels to be used. Also fix dnsmasq allows earlier kernels to be used. Also fix dnsmasq
bug which reported the wrong address when this failed. bug which reported the wrong address when this failed.
@@ -1684,13 +1695,13 @@ version 2.52
Added extract packaging stuff from Lee Essen to Added extract packaging stuff from Lee Essen to
contrib/Solaris10. contrib/Solaris10.
Increased the default limit on number of leases to 1000 Increased the default limit on number of leases to 1000
(from 150). This is mainly a defence against DoS attacks, (from 150). This is mainly a defence against DoS attacks,
and for the average "one for two class C networks" and for the average "one for two class C networks"
installation, IP address exhaustion does that just as installation, IP address exhaustion does that just as
well. Making the limit greater than the number of IP well. Making the limit greater than the number of IP
addresses available in such an installation removes a addresses available in such an installation removes a
surprise which otherwise can catch people out. surprise which otherwise can catch people out.
Removed extraneous trailing space in the value of the Removed extraneous trailing space in the value of the
DNSMASQ_TIME_REMAINING DNSMASQ_LEASE_LENGTH and DNSMASQ_TIME_REMAINING DNSMASQ_LEASE_LENGTH and
@@ -1733,9 +1744,9 @@ version 2.52
Fix link error when including Dbus but excluding DHCP. Fix link error when including Dbus but excluding DHCP.
Thanks to Oschtan for the bug report. Thanks to Oschtan for the bug report.
Updated French translation. Thanks to Gildas Le Nadan. Updated French translation. Thanks to Gildas Le Nadan.
Updated Polish translation. Thanks to Jan Psota. Updated Polish translation. Thanks to Jan Psota.
Updated Spanish translation. Thanks to Chris Chatham. Updated Spanish translation. Thanks to Chris Chatham.
@@ -1746,30 +1757,30 @@ version 2.52
version 2.51 version 2.51
Add support for internationalised DNS. Non-ASCII characters Add support for internationalised DNS. Non-ASCII characters
in domain names found in /etc/hosts, /etc/ethers and in domain names found in /etc/hosts, /etc/ethers and
/etc/dnsmasq.conf will be correctly handled by translation to /etc/dnsmasq.conf will be correctly handled by translation to
punycode, as specified in RFC3490. This function is only punycode, as specified in RFC3490. This function is only
available if dnsmasq is compiled with internationalisation available if dnsmasq is compiled with internationalisation
support, and adds a dependency on GNU libidn. Without i18n support, and adds a dependency on GNU libidn. Without i18n
support, dnsmasq continues to be compilable with just support, dnsmasq continues to be compilable with just
standard tools. Thanks to Yves Dorfsman for the standard tools. Thanks to Yves Dorfsman for the
suggestion. suggestion.
Add two more environment variables for lease-change scripts: Add two more environment variables for lease-change scripts:
First, DNSMASQ_SUPPLIED_HOSTNAME; this is set to the hostname First, DNSMASQ_SUPPLIED_HOSTNAME; this is set to the hostname
supplied by a client, even if the actual hostname used is supplied by a client, even if the actual hostname used is
over-ridden by dhcp-host or dhcp-ignore-names directives. over-ridden by dhcp-host or dhcp-ignore-names directives.
Also DNSMASQ_RELAY_ADDRESS which gives the address of Also DNSMASQ_RELAY_ADDRESS which gives the address of
a DHCP relay, if used. a DHCP relay, if used.
Suggestions from Michael Rack. Suggestions from Michael Rack.
Fix regression which broke echo of relay-agent Fix regression which broke echo of relay-agent
options. Thanks to Michael Rack for spotting this. options. Thanks to Michael Rack for spotting this.
Don't treat option 67 as being interchangeable with Don't treat option 67 as being interchangeable with
dhcp-boot parameters if it's specified as dhcp-boot parameters if it's specified as
dhcp-option-force. dhcp-option-force.
Make the code to call scripts on lease-change compile-time Make the code to call scripts on lease-change compile-time
optional. It can be switched off by editing src/config.h optional. It can be switched off by editing src/config.h
@@ -1796,16 +1807,16 @@ version 2.51
dhcp-optsfile. dhcp-optsfile.
Test which upstream nameserver to use every 10 seconds Test which upstream nameserver to use every 10 seconds
or 50 queries and not just when a query times out and or 50 queries and not just when a query times out and
is retried. This should improve performance when there is retried. This should improve performance when there
is a slow nameserver in the list. Thanks to Joe for the is a slow nameserver in the list. Thanks to Joe for the
suggestion. suggestion.
Don't do any PXE processing, even for clients with the Don't do any PXE processing, even for clients with the
correct vendorclass, unless at least one pxe-prompt or correct vendorclass, unless at least one pxe-prompt or
pxe-service option is given. This stops dnsmasq pxe-service option is given. This stops dnsmasq
interfering with proxy PXE subsystems when it is just interfering with proxy PXE subsystems when it is just
the DHCP server. Thanks to Spencer Clark for spotting this. the DHCP server. Thanks to Spencer Clark for spotting this.
Limit the blocksize used for TFTP transfers to a value Limit the blocksize used for TFTP transfers to a value
which avoids packet fragmentation, based on the MTU of the which avoids packet fragmentation, based on the MTU of the
@@ -1815,27 +1826,27 @@ version 2.51
Honour dhcp-ignore configuration for PXE and proxy-PXE Honour dhcp-ignore configuration for PXE and proxy-PXE
requests. Thanks to Niels Basjes for the bug report. requests. Thanks to Niels Basjes for the bug report.
Updated French translation. Thanks to Gildas Le Nadan. Updated French translation. Thanks to Gildas Le Nadan.
version 2.50 version 2.50
Fix security problem which allowed any host permitted to Fix security problem which allowed any host permitted to
do TFTP to possibly compromise dnsmasq by remote buffer do TFTP to possibly compromise dnsmasq by remote buffer
overflow when TFTP enabled. Thanks to Core Security overflow when TFTP enabled. Thanks to Core Security
Technologies and Iván Arce, Pablo Hernán Jorge, Alejandro Technologies and Iván Arce, Pablo Hernán Jorge, Alejandro
Pablo Rodriguez, Martín Coco, Alberto Soliño Testa and Pablo Rodriguez, Martín Coco, Alberto Soliño Testa and
Pablo Annetta. This problem has Bugtraq id: 36121 Pablo Annetta. This problem has Bugtraq id: 36121
and CVE: 2009-2957 and CVE: 2009-2957
Fix a problem which allowed a malicious TFTP client to Fix a problem which allowed a malicious TFTP client to
crash dnsmasq. Thanks to Steve Grubb at Red Hat for crash dnsmasq. Thanks to Steve Grubb at Red Hat for
spotting this. This problem has Bugtraq id: 36120 and spotting this. This problem has Bugtraq id: 36120 and
CVE: 2009-2958 CVE: 2009-2958
version 2.49 version 2.49
Fix regression in 2.48 which disables the lease-change Fix regression in 2.48 which disables the lease-change
script. Thanks to Jose Luis Duran for spotting this. script. Thanks to Jose Luis Duran for spotting this.
Log TFTP "file not found" errors. These were not logged, Log TFTP "file not found" errors. These were not logged,
since a normal PXELinux boot generates many of them, but since a normal PXELinux boot generates many of them, but
@@ -1846,9 +1857,9 @@ version 2.49
version 2.48 version 2.48
Archived the extensive, backwards, changelog to Archived the extensive, backwards, changelog to
CHANGELOG.archive. The current changelog now runs from CHANGELOG.archive. The current changelog now runs from
version 2.43 and runs conventionally. version 2.43 and runs conventionally.
Fixed bug which broke binding of servers to physical Fixed bug which broke binding of servers to physical
interfaces when interface names were longer than four interfaces when interface names were longer than four
@@ -1861,7 +1872,7 @@ version 2.48
Maintainability drive: removed bug and missing feature Maintainability drive: removed bug and missing feature
workarounds for some old platforms. Solaris 9, OpenBSD workarounds for some old platforms. Solaris 9, OpenBSD
older than 4.1, Glibc older than 2.2, Linux 2.2.x and older than 4.1, Glibc older than 2.2, Linux 2.2.x and
DBus older than 1.1.x are no longer supported. DBus older than 1.1.x are no longer supported.
Don't read included configuration files more than once: Don't read included configuration files more than once:
allows complex configuration structures without problems. allows complex configuration structures without problems.
@@ -1881,15 +1892,15 @@ version 2.48
Support --bridge-interface on all platforms, not just BSD. Support --bridge-interface on all platforms, not just BSD.
Added support for advanced PXE functions. It's now Added support for advanced PXE functions. It's now
possible to define a prompt and menu options which will possible to define a prompt and menu options which will
be displayed when a client PXE boots. It's also possible to be displayed when a client PXE boots. It's also possible to
hand-off booting to other boot servers. Proxy-DHCP, where hand-off booting to other boot servers. Proxy-DHCP, where
dnsmasq just supplies the PXE information and another DHCP dnsmasq just supplies the PXE information and another DHCP
server does address allocation, is also allowed. See the server does address allocation, is also allowed. See the
--pxe-prompt and --pxe-service keywords. Thanks to --pxe-prompt and --pxe-service keywords. Thanks to
Alkis Georgopoulos for the suggestion and Guilherme Moro Alkis Georgopoulos for the suggestion and Guilherme Moro
and Michael Brown for assistance. and Michael Brown for assistance.
Improvements to DHCP logging. Thanks to Tom Metro for Improvements to DHCP logging. Thanks to Tom Metro for
useful suggestions. useful suggestions.
@@ -1901,7 +1912,7 @@ version 2.48
Added --test command-line switch - syntax check Added --test command-line switch - syntax check
configuration files only. configuration files only.
Updated French translation. Thanks to Gildas Le Nadan. Updated French translation. Thanks to Gildas Le Nadan.
version 2.47 version 2.47
@@ -1914,32 +1925,32 @@ version 2.47
file on NetBSD as the other *BSD variants. Also allow file on NetBSD as the other *BSD variants. Also allow
LEASEFILE and CONFFILE symbols to be overridden in CFLAGS. LEASEFILE and CONFFILE symbols to be overridden in CFLAGS.
Handle duplicate address detection on IPv6 more Handle duplicate address detection on IPv6 more
intelligently. In IPv6, an interface can have an address intelligently. In IPv6, an interface can have an address
which is not usable, because it is still undergoing DAD which is not usable, because it is still undergoing DAD
(such addresses are marked "tentative"). Attempting to (such addresses are marked "tentative"). Attempting to
bind to an address in this state returns an error, bind to an address in this state returns an error,
EADDRNOTAVAIL. Previously, on getting such an error, EADDRNOTAVAIL. Previously, on getting such an error,
dnsmasq would silently abandon the address, and never dnsmasq would silently abandon the address, and never
listen on it. Now, it retries once per second for 20 listen on it. Now, it retries once per second for 20
seconds before generating a fatal error. 20 seconds should seconds before generating a fatal error. 20 seconds should
be long enough for any DAD process to complete, but can be be long enough for any DAD process to complete, but can be
adjusted in src/config.h if necessary. Thanks to Martin adjusted in src/config.h if necessary. Thanks to Martin
Krafft for the bug report. Krafft for the bug report.
Add DBus introspection. Patch from Jeremy Laine. Add DBus introspection. Patch from Jeremy Laine.
Update Dbus configuration file. Patch from Colin Walters. Update Dbus configuration file. Patch from Colin Walters.
Fix for this bug: Fix for this bug:
http://bugs.freedesktop.org/show_bug.cgi?id=18961 http://bugs.freedesktop.org/show_bug.cgi?id=18961
Support arbitrarily encapsulated DHCP options, suggestion Support arbitrarily encapsulated DHCP options, suggestion
and initial patch from Samium Gromoff. This is useful for and initial patch from Samium Gromoff. This is useful for
(eg) gPXE, which expect all its private options to be (eg) gPXE, which expect all its private options to be
encapsulated inside a single option 175. So, eg, encapsulated inside a single option 175. So, eg,
dhcp-option = encap:175, 190, "iscsi-client0" dhcp-option = encap:175, 190, "iscsi-client0"
dhcp-option = encap:175, 191, "iscsi-client0-secret" dhcp-option = encap:175, 191, "iscsi-client0-secret"
will provide iSCSI parameters to gPXE. will provide iSCSI parameters to gPXE.
@@ -2007,13 +2018,13 @@ version 2.46
long-standing request. Clients are assigned to a domain long-standing request. Clients are assigned to a domain
based in their IP address. based in their IP address.
Add --dhcp-fqdn flag, which changes behaviour if DNS names Add --dhcp-fqdn flag, which changes behaviour if DNS names
assigned to DHCP clients. When this is set, there must be assigned to DHCP clients. When this is set, there must be
a domain associated with each client, and only a domain associated with each client, and only
fully-qualified domain names are added to the DNS. The fully-qualified domain names are added to the DNS. The
advantage is that the only the FQDN needs to be unique, advantage is that the only the FQDN needs to be unique,
so that two or more DHCP clients can share a hostname, as so that two or more DHCP clients can share a hostname, as
long as they are in different domains. long as they are in different domains.
Set environment variable DNSMASQ_DOMAIN when invoking Set environment variable DNSMASQ_DOMAIN when invoking
lease-change script. This may be useful information to lease-change script. This may be useful information to
@@ -2048,7 +2059,7 @@ version 2.46
asks for an address. This is useful to give a fixed asks for an address. This is useful to give a fixed
address to a host which has two network interfaces address to a host which has two network interfaces
(say, a laptop with wired and wireless interfaces.) (say, a laptop with wired and wireless interfaces.)
It's very important to ensure that only one interface It's very important to ensure that only one interface
at a time is up, since dnsmasq abandons the first lease at a time is up, since dnsmasq abandons the first lease
and re-uses the address before the leased time has and re-uses the address before the leased time has
elapsed. John Gray suggested this. elapsed. John Gray suggested this.
@@ -2078,23 +2089,23 @@ version 2.46
version 2.45 version 2.45
Fix total DNS failure in release 2.44 unless --min-port Fix total DNS failure in release 2.44 unless --min-port
specified. Thanks to Steven Barth and Grant Coady for specified. Thanks to Steven Barth and Grant Coady for
bugreport. Also reject out-of-range port spec, which could bugreport. Also reject out-of-range port spec, which could
break things too: suggestion from Gilles Espinasse. break things too: suggestion from Gilles Espinasse.
version 2.44 version 2.44
Fix crash when unknown client attempts to renew a DHCP Fix crash when unknown client attempts to renew a DHCP
lease, problem introduced in version 2.43. Thanks to lease, problem introduced in version 2.43. Thanks to
Carlos Carvalho for help chasing this down. Carlos Carvalho for help chasing this down.
Fix potential crash when a host which doesn't have a lease Fix potential crash when a host which doesn't have a lease
does DHCPINFORM. Again introduced in 2.43. This bug has does DHCPINFORM. Again introduced in 2.43. This bug has
never been reported in the wild. never been reported in the wild.
Fix crash in netlink code introduced in 2.43. Thanks to Fix crash in netlink code introduced in 2.43. Thanks to
Jean Wolter for finding this. Jean Wolter for finding this.
Change implementation of min_port to work even if min-port Change implementation of min_port to work even if min-port
is large. is large.
@@ -2140,10 +2151,10 @@ version 2.43
Improve error checking during startup. Previously, some Improve error checking during startup. Previously, some
errors which occurred during startup would be worked errors which occurred during startup would be worked
around, with dnsmasq still starting up. Some were logged, around, with dnsmasq still starting up. Some were logged,
some silent. Now, they all cause a fatal error and dnsmasq some silent. Now, they all cause a fatal error and dnsmasq
terminates with a non-zero exit code. The errors are those terminates with a non-zero exit code. The errors are those
associated with changing uid and gid, setting process associated with changing uid and gid, setting process
capabilities and writing the pidfile. Thanks to Uwe capabilities and writing the pidfile. Thanks to Uwe
Gansert and the Suse security team for pointing out Gansert and the Suse security team for pointing out
this improvement, and Bill Reimers for good implementation this improvement, and Bill Reimers for good implementation
suggestions. suggestions.
@@ -2152,16 +2163,16 @@ version 2.43
support when compiling against versions of uclibc which support when compiling against versions of uclibc which
don't support it. Thanks to Stephane Billiart for the patch. don't support it. Thanks to Stephane Billiart for the patch.
Implement random source ports for interactions with Implement random source ports for interactions with
upstream nameservers. New spoofing attacks have been found upstream nameservers. New spoofing attacks have been found
against nameservers which do not do this, though it is not against nameservers which do not do this, though it is not
clear if dnsmasq is vulnerable, since to doesn't implement clear if dnsmasq is vulnerable, since to doesn't implement
recursion. By default dnsmasq will now use a different recursion. By default dnsmasq will now use a different
source port (and socket) for each query it sends source port (and socket) for each query it sends
upstream. This behaviour can suppressed using the upstream. This behaviour can suppressed using the
--query-port option, and the old default behaviour --query-port option, and the old default behaviour
restored using --query-port=0. Explicit source-port restored using --query-port=0. Explicit source-port
specifications in --server configs are still honoured. specifications in --server configs are still honoured.
Replace the random number generator, for better Replace the random number generator, for better
security. On most BSD systems, dnsmasq uses the security. On most BSD systems, dnsmasq uses the
@@ -2181,5 +2192,5 @@ version 2.43
version 2.42 version 2.42
The changelog for version 2.42 and earlier is The changelog for version 2.42 and earlier is
available in CHANGELOG.archive. available in CHANGELOG.archive.
+6 -4
View File
@@ -55,6 +55,8 @@ dbus_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG)
dbus_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --libs dbus-1` dbus_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_DBUS $(PKG_CONFIG) --libs dbus-1`
idn_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --cflags libidn` idn_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --cflags libidn`
idn_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --libs libidn` idn_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_IDN $(PKG_CONFIG) --libs libidn`
idn2_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFIG) --cflags libidn2`
idn2_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LIBIDN2 $(PKG_CONFIG) --libs libidn2`
ct_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --cflags libnetfilter_conntrack` ct_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --cflags libnetfilter_conntrack`
ct_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack` ct_libs = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_CONNTRACK $(PKG_CONFIG) --libs libnetfilter_conntrack`
lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.2` lua_cflags = `echo $(COPTS) | $(top)/bld/pkg-wrapper HAVE_LUASCRIPT $(PKG_CONFIG) --cflags lua5.2`
@@ -82,8 +84,8 @@ hdrs = dnsmasq.h config.h dhcp-protocol.h dhcp6-protocol.h \
all : $(BUILDDIR) all : $(BUILDDIR)
@cd $(BUILDDIR) && $(MAKE) \ @cd $(BUILDDIR) && $(MAKE) \
top="$(top)" \ top="$(top)" \
build_cflags="$(version) $(dbus_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \ build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \
build_libs="$(dbus_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs)" \ build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs)" \
-f $(top)/Makefile dnsmasq -f $(top)/Makefile dnsmasq
mostly_clean : mostly_clean :
@@ -106,8 +108,8 @@ all-i18n : $(BUILDDIR)
@cd $(BUILDDIR) && $(MAKE) \ @cd $(BUILDDIR) && $(MAKE) \
top="$(top)" \ top="$(top)" \
i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \ i18n=-DLOCALEDIR=\'\"$(LOCALEDIR)\"\' \
build_cflags="$(version) $(dbus_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags) `$(PKG_CONFIG) --cflags libidn`" \ build_cflags="$(version) $(dbus_cflags) $(idn2_cflags) $(idn_cflags) $(ct_cflags) $(lua_cflags) $(nettle_cflags)" \
build_libs="$(dbus_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs) `$(PKG_CONFIG) --libs libidn`" \ build_libs="$(dbus_libs) $(idn2_libs) $(idn_libs) $(ct_libs) $(lua_libs) $(sunos_libs) $(nettle_libs) $(gmp_libs)" \
-f $(top)/Makefile dnsmasq -f $(top)/Makefile dnsmasq
for f in `cd $(PO); echo *.po`; do \ for f in `cd $(PO); echo *.po`; do \
cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \ cd $(top) && cd $(BUILDDIR) && $(MAKE) top="$(top)" -f $(top)/Makefile $${f%.po}.mo; \
+4 -3
View File
@@ -48,6 +48,10 @@ ifeq (,$(filter nodbus,$(DEB_BUILD_OPTIONS)))
DEB_COPTS += -DHAVE_DBUS DEB_COPTS += -DHAVE_DBUS
endif endif
ifeq (,$(filter noidn, $(DEB_BUILD_OPTIONS)))
DEB_COPTS += -DHAVE_IDN
endif
ifeq (,$(filter noconntrack,$(DEB_BUILD_OPTIONS))) ifeq (,$(filter noconntrack,$(DEB_BUILD_OPTIONS)))
ifeq ($(DEB_HOST_ARCH_OS),linux) ifeq ($(DEB_HOST_ARCH_OS),linux)
DEB_COPTS += -DHAVE_CONNTRACK DEB_COPTS += -DHAVE_CONNTRACK
@@ -84,9 +88,6 @@ endif
ifneq (,$(filter noi18n,$(DEB_BUILD_OPTIONS))) ifneq (,$(filter noi18n,$(DEB_BUILD_OPTIONS)))
TARGET = install TARGET = install
ifeq (,$(filter noidn, $(DEB_BUILD_OPTIONS)))
DEB_COPTS += -DHAVE_IDN
endif
endif endif
ifneq (,$(filter uselua,$(DEB_BUILD_OPTIONS))) ifneq (,$(filter uselua,$(DEB_BUILD_OPTIONS)))
+2
View File
@@ -1021,6 +1021,8 @@ dhcp-host directive (or one implied by /etc/ethers) then the special
tag "known" is set. This allows dnsmasq to be configured to tag "known" is set. This allows dnsmasq to be configured to
ignore requests from unknown machines using ignore requests from unknown machines using
.B --dhcp-ignore=tag:!known .B --dhcp-ignore=tag:!known
If the host matches only a dhcp-host directive which cannot
be used because it specifies an address on different subnet, the tag "known-othernet" is set.
Ethernet addresses (but not client-ids) may have Ethernet addresses (but not client-ids) may have
wildcard bytes, so for example wildcard bytes, so for example
.B --dhcp-host=00:20:e0:3b:13:*,ignore .B --dhcp-host=00:20:e0:3b:13:*,ignore
+30 -39
View File
@@ -9,10 +9,10 @@
# Simon Kelley <simon@thekelleys.org.uk>, 2005. # Simon Kelley <simon@thekelleys.org.uk>, 2005.
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: dnsmasq 2.74\n" "Project-Id-Version: dnsmasq 2.77\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-06-18 12:24+0100\n" "POT-Creation-Date: 2009-06-18 12:24+0100\n"
"PO-Revision-Date: 2015-07-22 23:07+0200\n" "PO-Revision-Date: 2017-05-11 19:45+0200\n"
"Last-Translator: Conrad Kostecki <ck@conrad-kostecki.de>\n" "Last-Translator: Conrad Kostecki <ck@conrad-kostecki.de>\n"
"Language-Team: German <de@li.org>\n" "Language-Team: German <de@li.org>\n"
"Language: de\n" "Language: de\n"
@@ -20,7 +20,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 1.8.3\n" "X-Generator: Poedit 2.0.1\n"
"X-Poedit-SourceCharset: UTF-8\n" "X-Poedit-SourceCharset: UTF-8\n"
#: cache.c:513 #: cache.c:513
@@ -387,9 +387,8 @@ msgid "Specify a SRV record."
msgstr "SRV-Eintrag festlegen." msgstr "SRV-Eintrag festlegen."
#: option.c:405 #: option.c:405
#, fuzzy
msgid "Display this message. Use --help dhcp or --help dhcp6 for known DHCP options." msgid "Display this message. Use --help dhcp or --help dhcp6 for known DHCP options."
msgstr "Diese Hilfe anzeigen. Benutzen Sie --help dhcp für bekannte DHCP-Optionen." msgstr "Diese Hilfe anzeigen. Benutzen Sie --help dhcp oder --help dhcp6 für bekannte DHCP-Optionen."
#: option.c:406 #: option.c:406
#, c-format #, c-format
@@ -464,7 +463,7 @@ msgstr "Lease-Änderungs-Skript mit den Rechten dieses Nutzers ausführen."
#: option.c:423 #: option.c:423
msgid "Call dhcp-script with changes to local ARP table." msgid "Call dhcp-script with changes to local ARP table."
msgstr "" msgstr "Rufe dhcp-script mit Änderungen an der lokalen ARP-Tabelle auf."
#: option.c:424 #: option.c:424
msgid "Read configuration from all the files in this directory." msgid "Read configuration from all the files in this directory."
@@ -522,9 +521,8 @@ msgid "Maximum number of conncurrent TFTP transfers (defaults to %s)."
msgstr "Höchstzahl nebenläufiger TFTP-Übertragungen (%s voreingestellt)." msgstr "Höchstzahl nebenläufiger TFTP-Übertragungen (%s voreingestellt)."
#: option.c:437 #: option.c:437
#, fuzzy
msgid "Maximum MTU to use for TFTP transfers." msgid "Maximum MTU to use for TFTP transfers."
msgstr "Höchstzahl nebenläufiger TFTP-Übertragungen (%s voreingestellt)." msgstr "Maximale MTU für TFTP-Übertragungen erreicht."
#: option.c:438 #: option.c:438
msgid "Disable the TFTP blocksize extension." msgid "Disable the TFTP blocksize extension."
@@ -579,9 +577,8 @@ msgid "Specify lowest port available for DNS query transmission."
msgstr "Niedrigsten verfügbaren Port für Übertragung von DNS-Anfragen festlegen." msgstr "Niedrigsten verfügbaren Port für Übertragung von DNS-Anfragen festlegen."
#: option.c:451 #: option.c:451
#, fuzzy
msgid "Specify highest port available for DNS query transmission." msgid "Specify highest port available for DNS query transmission."
msgstr "Niedrigsten verfügbaren Port für Übertragung von DNS-Anfragen festlegen." msgstr "Höchsten verfügbaren Port für Übertragung von DNS-Anfragen festlegen."
#: option.c:452 #: option.c:452
msgid "Use only fully qualified domain names for DHCP clients." msgid "Use only fully qualified domain names for DHCP clients."
@@ -618,17 +615,15 @@ msgstr "Konfigurationssyntax prüfen."
#: option.c:460 #: option.c:460
msgid "Add requestor's MAC address to forwarded DNS queries." msgid "Add requestor's MAC address to forwarded DNS queries."
msgstr "Anfragende MAC-Adresse in die weiterleitende DNS-Anfrage einfügen" msgstr "Anfragende MAC-Adresse in die weiterleitende DNS-Anfrage einfügen."
#: option.c:461 #: option.c:461
#, fuzzy
msgid "Add specified IP subnet to forwarded DNS queries." msgid "Add specified IP subnet to forwarded DNS queries."
msgstr "Füge das IP-Subnetz des Anfragenden in die weitergeleiteten DNS-Anfragen hinzu." msgstr "Füge spezifiziertes IP-Subnetz an weitergeleiteten DNS-Anfragen hinzu."
#: option.c:462 #: option.c:462
#, fuzzy
msgid "Add client identification to forwarded DNS queries." msgid "Add client identification to forwarded DNS queries."
msgstr "Füge das IP-Subnetz des Anfragenden in die weitergeleiteten DNS-Anfragen hinzu." msgstr "Füge Klient Identifikationan weitergeleiteten DNS-Anfragen hinzu."
#: option.c:463 #: option.c:463
msgid "Proxy DNSSEC validation results from upstream nameservers." msgid "Proxy DNSSEC validation results from upstream nameservers."
@@ -708,7 +703,7 @@ msgstr "Spezifiziere Vertrauensursprung (Trust Anchor) der Schlüssel-Prüfdaten
#: option.c:482 #: option.c:482
msgid "Disable upstream checking for DNSSEC debugging." msgid "Disable upstream checking for DNSSEC debugging."
msgstr "Deaktiviere die Überprüfung vorgelagerter Server für DNSSEC-Debugging" msgstr "Deaktiviere die Überprüfung vorgelagerter Server für DNSSEC-Debugging."
#: option.c:483 #: option.c:483
msgid "Ensure answers without DNSSEC are in unsigned zones." msgid "Ensure answers without DNSSEC are in unsigned zones."
@@ -743,14 +738,12 @@ msgid "Do not log RA."
msgstr "RA nicht protokollieren." msgstr "RA nicht protokollieren."
#: option.c:493 #: option.c:493
#, fuzzy
msgid "Accept queries only from directly-connected networks." msgid "Accept queries only from directly-connected networks."
msgstr "Akzeptiere nur Anfragen von direkt verbundenen Netzwerken" msgstr "Akzeptiere nur Anfragen von direkt verbundenen Netzwerken."
#: option.c:494 #: option.c:494
#, fuzzy
msgid "Detect and remove DNS forwarding loops." msgid "Detect and remove DNS forwarding loops."
msgstr "Erkennen und Entfernen von DNS-Weiterleitungsschleifen" msgstr "Erkennen und Entfernen von DNS-Weiterleitungsschleifen."
#: option.c:495 #: option.c:495
msgid "Ignore DNS responses containing ipaddr." msgid "Ignore DNS responses containing ipaddr."
@@ -758,7 +751,7 @@ msgstr "Ignoriere DNS-Antworten, welche ipaddr enthalten."
#: option.c:496 #: option.c:496
msgid "Set TTL in DNS responses with DHCP-derived addresses." msgid "Set TTL in DNS responses with DHCP-derived addresses."
msgstr "" msgstr "Setzte TTL in DNS-Antworten mit DHCP-abgeleiteten Adressen."
#: option.c:698 #: option.c:698
#, c-format #, c-format
@@ -781,7 +774,7 @@ msgstr "Gültige Optionen sind:\n"
#: option.c:749 option.c:843 #: option.c:749 option.c:843
msgid "bad address" msgid "bad address"
msgstr "Fehlerhafte Adresse" msgstr "Fehlerhafte Adresse."
#: option.c:773 option.c:777 #: option.c:773 option.c:777
msgid "bad port" msgid "bad port"
@@ -812,9 +805,8 @@ msgid "bad IPv6 address"
msgstr "Fehlerhafte IPv6-Adresse" msgstr "Fehlerhafte IPv6-Adresse"
#: option.c:1203 #: option.c:1203
#, fuzzy
msgid "bad IPv4 address" msgid "bad IPv4 address"
msgstr "Fehlerhafte IPv6-Adresse" msgstr "Fehlerhafte IPv4-Adresse"
#: option.c:1276 option.c:1370 #: option.c:1276 option.c:1370
msgid "bad domain in dhcp-option" msgid "bad domain in dhcp-option"
@@ -876,7 +868,7 @@ msgstr "Neuübersetzung mit HAVE_SCRIPT nötig, um Lease-Änderungs-Skripte ausz
#: option.c:1789 #: option.c:1789
msgid "recompile with HAVE_LUASCRIPT defined to enable Lua scripts" msgid "recompile with HAVE_LUASCRIPT defined to enable Lua scripts"
msgstr "Um Benutzerdefinierte Lua-Scripte zu ermöglichen, muss mit HAVE_LUASCRIPT neu kompiliert werden" msgstr "Um Benutzerdefinierte Lua-Skripte zu ermöglichen, muss mit HAVE_LUASCRIPT neu kompiliert werden"
#: option.c:2041 option.c:2086 option.c:2142 #: option.c:2041 option.c:2086 option.c:2142
msgid "bad prefix" msgid "bad prefix"
@@ -973,7 +965,7 @@ msgstr "unzulässiger Alias-Bereich"
#: option.c:3721 #: option.c:3721
msgid "bad TTL" msgid "bad TTL"
msgstr "" msgstr "unzulässige TTL"
#: option.c:3727 #: option.c:3727
msgid "bad CNAME" msgid "bad CNAME"
@@ -1206,7 +1198,7 @@ msgstr "Schnittstelle %s konnte DHCPv6-Multicast-Gruppe nicht beitreten: %s"
#: network.c:1106 #: network.c:1106
msgid "try increasing /proc/sys/net/core/optmem_max" msgid "try increasing /proc/sys/net/core/optmem_max"
msgstr "" msgstr "Versuche /proc/sys/net/core/optmem_max zu erhöhen"
#: network.c:1302 #: network.c:1302
#, c-format #, c-format
@@ -1225,7 +1217,7 @@ msgstr "ignoriere Namensserver %s - kann Socket nicht erzeugen/binden: %s"
#: network.c:1520 #: network.c:1520
msgid "(no DNSSEC)" msgid "(no DNSSEC)"
msgstr "" msgstr "(kein DNSSEC)"
# FIXME: this isn't translatable - always provide full strings, do not assemble yourself! -- MA # FIXME: this isn't translatable - always provide full strings, do not assemble yourself! -- MA
#: network.c:1523 #: network.c:1523
@@ -1255,9 +1247,9 @@ msgid "using standard nameservers for %s %s"
msgstr "Benutze standard Namensserver für %s %s" msgstr "Benutze standard Namensserver für %s %s"
#: network.c:1534 #: network.c:1534
#, fuzzy, c-format #, c-format
msgid "using nameserver %s#%d for %s %s %s" msgid "using nameserver %s#%d for %s %s %s"
msgstr "Benutze Namensserver %s#%d für %s %s" msgstr "Benutze Namensserver %s#%d für %s %s %s"
#: network.c:1538 #: network.c:1538
#, c-format #, c-format
@@ -1275,18 +1267,17 @@ msgid "using nameserver %s#%d"
msgstr "Benutze Namensserver %s#%d" msgstr "Benutze Namensserver %s#%d"
#: network.c:1548 #: network.c:1548
#, fuzzy, c-format #, c-format
msgid "using %d more nameservers" msgid "using %d more nameservers"
msgstr "Benutze Namensserver %s#%d" msgstr "Benutze %d mehr Namensserver"
#: dnsmasq.c:166 #: dnsmasq.c:166
msgid "dhcp-hostsdir, dhcp-optsdir and hostsdir are not supported on this platform" msgid "dhcp-hostsdir, dhcp-optsdir and hostsdir are not supported on this platform"
msgstr "dhcp-hostsdir, dhcp-optsdir und hostsdir sind auf dieser Plattform nicht unterstüzt" msgstr "dhcp-hostsdir, dhcp-optsdir und hostsdir sind auf dieser Plattform nicht unterstüzt"
#: dnsmasq.c:181 #: dnsmasq.c:181
#, fuzzy
msgid "no root trust anchor provided for DNSSEC" msgid "no root trust anchor provided for DNSSEC"
msgstr "Keine Vertrauensursprünge (Trust Anchor) für DNSSEC verfügbar" msgstr "Keine Root-Vertrauensursprünge (Root Trust Anchor) für DNSSEC verfügbar"
#: dnsmasq.c:184 #: dnsmasq.c:184
msgid "cannot reduce cache size from default when DNSSEC enabled" msgid "cannot reduce cache size from default when DNSSEC enabled"
@@ -1326,7 +1317,7 @@ msgstr "Loop-Erkennung nicht verfügbar, Aktiviere HAVE_LOOP in src/config.h"
#: dnsmasq.c:227 #: dnsmasq.c:227
msgid "max_port cannot be smaller than min_port" msgid "max_port cannot be smaller than min_port"
msgstr "" msgstr "max_port darf nicht kleiner als min_port sein"
#: dnsmasq.c:234 #: dnsmasq.c:234
msgid "zone serial must be configured in --auth-soa" msgid "zone serial must be configured in --auth-soa"
@@ -1618,7 +1609,7 @@ msgstr "APR-Cache Injektion fehlgeschlagen: %s"
#: dhcp.c:460 #: dhcp.c:460
#, c-format #, c-format
msgid "Error sending DHCP packet to %s: %s" msgid "Error sending DHCP packet to %s: %s"
msgstr "" msgstr "Fehler beim Senden des DHCP-Pakets an %s: %s"
#: dhcp.c:521 #: dhcp.c:521
#, c-format #, c-format
@@ -2188,9 +2179,9 @@ msgid "%d addresses %s"
msgstr "%d Adressen %s" msgstr "%d Adressen %s"
#: inotify.c:62 #: inotify.c:62
#, fuzzy, c-format #, c-format
msgid "cannot access path %s: %s" msgid "cannot access path %s: %s"
msgstr "Kann auf %s nicht zugreifen: %s" msgstr "Kann auf Pfad %s nicht zugreifen: %s"
#: inotify.c:95 #: inotify.c:95
#, c-format #, c-format
@@ -2200,7 +2191,7 @@ msgstr "Kann kein inotify erzeugen: %s"
#: inotify.c:111 #: inotify.c:111
#, c-format #, c-format
msgid "too many symlinks following %s" msgid "too many symlinks following %s"
msgstr "" msgstr "Zu viele nachfolgende symbolische Links folgend %s"
#: inotify.c:127 #: inotify.c:127
#, c-format #, c-format
+11 -6
View File
@@ -94,10 +94,10 @@ HAVE_DBUS
servers via DBus. servers via DBus.
HAVE_IDN HAVE_IDN
define this if you want international domain name support. define this if you want international domain name 2003 support.
NOTE: for backwards compatibility, IDN support is automatically
included when internationalisation support is built, using the HAVE_LIBIDN2
*-i18n makefile targets, even if HAVE_IDN is not explicitly set. define this if you want international domain name 2008 support.
HAVE_CONNTRACK HAVE_CONNTRACK
define this to include code which propagates conntrack marks from define this to include code which propagates conntrack marks from
@@ -177,6 +177,7 @@ RESOLVFILE
/* #define HAVE_LUASCRIPT */ /* #define HAVE_LUASCRIPT */
/* #define HAVE_DBUS */ /* #define HAVE_DBUS */
/* #define HAVE_IDN */ /* #define HAVE_IDN */
/* #define HAVE_LIBIDN2 */
/* #define HAVE_CONNTRACK */ /* #define HAVE_CONNTRACK */
/* #define HAVE_DNSSEC */ /* #define HAVE_DNSSEC */
@@ -396,10 +397,14 @@ static char *compile_opts =
"no-" "no-"
#endif #endif
"i18n " "i18n "
#if !defined(LOCALEDIR) && !defined(HAVE_IDN) #if defined(HAVE_LIBIDN2)
"IDN2 "
#else
#if !defined(HAVE_IDN)
"no-" "no-"
#endif #endif
"IDN " "IDN "
#endif
#ifndef HAVE_DHCP #ifndef HAVE_DHCP
"no-" "no-"
#endif #endif
+13 -9
View File
@@ -145,7 +145,7 @@ void dhcp_packet(time_t now, int pxe_fd)
struct cmsghdr *cmptr; struct cmsghdr *cmptr;
struct iovec iov; struct iovec iov;
ssize_t sz; ssize_t sz;
int iface_index = 0, unicast_dest = 0, is_inform = 0; int iface_index = 0, unicast_dest = 0, is_inform = 0, loopback = 0;
int rcvd_iface_index; int rcvd_iface_index;
struct in_addr iface_addr; struct in_addr iface_addr;
struct iface_param parm; struct iface_param parm;
@@ -223,9 +223,13 @@ void dhcp_packet(time_t now, int pxe_fd)
} }
#endif #endif
if (!indextoname(daemon->dhcpfd, iface_index, ifr.ifr_name)) if (!indextoname(daemon->dhcpfd, iface_index, ifr.ifr_name) ||
ioctl(daemon->dhcpfd, SIOCGIFFLAGS, &ifr) != 0)
return; return;
mess = (struct dhcp_packet *)daemon->dhcp_packet.iov_base;
loopback = !mess->giaddr.s_addr && (ifr.ifr_flags & IFF_LOOPBACK);
#ifdef HAVE_LINUX_NETWORK #ifdef HAVE_LINUX_NETWORK
/* ARP fiddling uses original interface even if we pretend to use a different one. */ /* ARP fiddling uses original interface even if we pretend to use a different one. */
strncpy(arp_req.arp_dev, ifr.ifr_name, 16); strncpy(arp_req.arp_dev, ifr.ifr_name, 16);
@@ -331,7 +335,7 @@ void dhcp_packet(time_t now, int pxe_fd)
/* We're relaying this request */ /* We're relaying this request */
if (parm.relay_local.s_addr != 0 && if (parm.relay_local.s_addr != 0 &&
relay_upstream4(parm.relay, (struct dhcp_packet *)daemon->dhcp_packet.iov_base, (size_t)sz, iface_index)) relay_upstream4(parm.relay, mess, (size_t)sz, iface_index))
return; return;
/* May have configured relay, but not DHCP server */ /* May have configured relay, but not DHCP server */
@@ -340,7 +344,7 @@ void dhcp_packet(time_t now, int pxe_fd)
lease_prune(NULL, now); /* lose any expired leases */ lease_prune(NULL, now); /* lose any expired leases */
iov.iov_len = dhcp_reply(parm.current, ifr.ifr_name, iface_index, (size_t)sz, iov.iov_len = dhcp_reply(parm.current, ifr.ifr_name, iface_index, (size_t)sz,
now, unicast_dest, &is_inform, pxe_fd, iface_addr, recvtime); now, unicast_dest, loopback, &is_inform, pxe_fd, iface_addr, recvtime);
lease_update_file(now); lease_update_file(now);
lease_update_dns(0); lease_update_dns(0);
@@ -647,7 +651,7 @@ struct dhcp_config *config_find_by_address(struct dhcp_config *configs, struct i
This wrapper handles a cache and load-limiting. This wrapper handles a cache and load-limiting.
Return is NULL is address in use, or a pointer to a cache entry Return is NULL is address in use, or a pointer to a cache entry
recording that it isn't. */ recording that it isn't. */
struct ping_result *do_icmp_ping(time_t now, struct in_addr addr, unsigned int hash) struct ping_result *do_icmp_ping(time_t now, struct in_addr addr, unsigned int hash, int loopback)
{ {
static struct ping_result dummy; static struct ping_result dummy;
struct ping_result *r, *victim = NULL; struct ping_result *r, *victim = NULL;
@@ -671,9 +675,9 @@ struct ping_result *do_icmp_ping(time_t now, struct in_addr addr, unsigned int h
} }
/* didn't find cached entry */ /* didn't find cached entry */
if ((count >= max) || option_bool(OPT_NO_PING)) if ((count >= max) || option_bool(OPT_NO_PING) || loopback)
{ {
/* overloaded, or configured not to check, return "not in use" */ /* overloaded, or configured not to check, loopback interface, return "not in use" */
dummy.hash = 0; dummy.hash = 0;
return &dummy; return &dummy;
} }
@@ -705,7 +709,7 @@ struct ping_result *do_icmp_ping(time_t now, struct in_addr addr, unsigned int h
int address_allocate(struct dhcp_context *context, int address_allocate(struct dhcp_context *context,
struct in_addr *addrp, unsigned char *hwaddr, int hw_len, struct in_addr *addrp, unsigned char *hwaddr, int hw_len,
struct dhcp_netid *netids, time_t now) struct dhcp_netid *netids, time_t now, int loopback)
{ {
/* Find a free address: exclude anything in use and anything allocated to /* Find a free address: exclude anything in use and anything allocated to
a particular hwaddr/clientid/hostname in our configuration. a particular hwaddr/clientid/hostname in our configuration.
@@ -763,7 +767,7 @@ int address_allocate(struct dhcp_context *context,
{ {
struct ping_result *r; struct ping_result *r;
if ((r = do_icmp_ping(now, addr, j))) if ((r = do_icmp_ping(now, addr, j, loopback)))
{ {
/* consec-ip mode: we offered this address for another client /* consec-ip mode: we offered this address for another client
(different hash) recently, don't offer it to this one. */ (different hash) recently, don't offer it to this one. */
+1 -1
View File
@@ -1375,7 +1375,7 @@ static void async_event(int pipe, time_t now)
/* update timestamp file on TERM if time is considered valid */ /* update timestamp file on TERM if time is considered valid */
if (daemon->back_to_the_future) if (daemon->back_to_the_future)
{ {
if (utime(daemon->timestamp_file, NULL) == -1) if (utimes(daemon->timestamp_file, NULL) == -1)
my_syslog(LOG_ERR, _("failed to update mtime on %s: %s"), daemon->timestamp_file, strerror(errno)); my_syslog(LOG_ERR, _("failed to update mtime on %s: %s"), daemon->timestamp_file, strerror(errno));
} }
#endif #endif
+4 -4
View File
@@ -117,7 +117,6 @@ typedef unsigned long long u64;
#include <sys/uio.h> #include <sys/uio.h>
#include <syslog.h> #include <syslog.h>
#include <dirent.h> #include <dirent.h>
#include <utime.h>
#ifndef HAVE_LINUX_NETWORK #ifndef HAVE_LINUX_NETWORK
# include <net/if_dl.h> # include <net/if_dl.h>
#endif #endif
@@ -1293,10 +1292,10 @@ struct dhcp_context *narrow_context(struct dhcp_context *context,
struct in_addr taddr, struct in_addr taddr,
struct dhcp_netid *netids); struct dhcp_netid *netids);
struct ping_result *do_icmp_ping(time_t now, struct in_addr addr, struct ping_result *do_icmp_ping(time_t now, struct in_addr addr,
unsigned int hash); unsigned int hash, int loopback);
int address_allocate(struct dhcp_context *context, int address_allocate(struct dhcp_context *context,
struct in_addr *addrp, unsigned char *hwaddr, int hw_len, struct in_addr *addrp, unsigned char *hwaddr, int hw_len,
struct dhcp_netid *netids, time_t now); struct dhcp_netid *netids, time_t now, int loopback);
void dhcp_read_ethers(void); void dhcp_read_ethers(void);
struct dhcp_config *config_find_by_address(struct dhcp_config *configs, struct in_addr addr); struct dhcp_config *config_find_by_address(struct dhcp_config *configs, struct in_addr addr);
char *host_from_dns(struct in_addr addr); char *host_from_dns(struct in_addr addr);
@@ -1345,7 +1344,8 @@ void lease_add_extradata(struct dhcp_lease *lease, unsigned char *data,
/* rfc2131.c */ /* rfc2131.c */
#ifdef HAVE_DHCP #ifdef HAVE_DHCP
size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index, size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
size_t sz, time_t now, int unicast_dest, int *is_inform, int pxe_fd, struct in_addr fallback, time_t recvtime); size_t sz, time_t now, int unicast_dest, int loopback,
int *is_inform, int pxe_fd, struct in_addr fallback, time_t recvtime);
unsigned char *extended_hwaddr(int hwtype, int hwlen, unsigned char *hwaddr, unsigned char *extended_hwaddr(int hwtype, int hwlen, unsigned char *hwaddr,
int clid_len, unsigned char *clid, int *len_out); int clid_len, unsigned char *clid, int *len_out);
#endif #endif
+7 -5
View File
@@ -475,7 +475,7 @@ int setup_timestamp(void)
if (difftime(timestamp_time, time(0)) <= 0) if (difftime(timestamp_time, time(0)) <= 0)
{ {
/* time already OK, update timestamp, and do key checking from the start. */ /* time already OK, update timestamp, and do key checking from the start. */
if (utime(daemon->timestamp_file, NULL) == -1) if (utimes(daemon->timestamp_file, NULL) == -1)
my_syslog(LOG_ERR, _("failed to update mtime on %s: %s"), daemon->timestamp_file, strerror(errno)); my_syslog(LOG_ERR, _("failed to update mtime on %s: %s"), daemon->timestamp_file, strerror(errno));
daemon->back_to_the_future = 1; daemon->back_to_the_future = 1;
return 0; return 0;
@@ -489,12 +489,14 @@ int setup_timestamp(void)
int fd = open(daemon->timestamp_file, O_WRONLY | O_CREAT | O_NONBLOCK | O_EXCL, 0666); int fd = open(daemon->timestamp_file, O_WRONLY | O_CREAT | O_NONBLOCK | O_EXCL, 0666);
if (fd != -1) if (fd != -1)
{ {
struct utimbuf timbuf; struct timeval tv[2];
close(fd); close(fd);
timestamp_time = timbuf.actime = timbuf.modtime = 1420070400; /* 1-1-2015 */ timestamp_time = 1420070400; /* 1-1-2015 */
if (utime(daemon->timestamp_file, &timbuf) == 0) tv[0].tv_sec = tv[1].tv_sec = timestamp_time;
tv[0].tv_usec = tv[1].tv_usec = 0;
if (utimes(daemon->timestamp_file, tv) == 0)
goto check_and_exit; goto check_and_exit;
} }
} }
@@ -519,7 +521,7 @@ static int check_date_range(u32 date_start, u32 date_end)
{ {
if (daemon->back_to_the_future == 0 && difftime(timestamp_time, curtime) <= 0) if (daemon->back_to_the_future == 0 && difftime(timestamp_time, curtime) <= 0)
{ {
if (utime(daemon->timestamp_file, NULL) != 0) if (utimes(daemon->timestamp_file, NULL) != 0)
my_syslog(LOG_ERR, _("failed to update mtime on %s: %s"), daemon->timestamp_file, strerror(errno)); my_syslog(LOG_ERR, _("failed to update mtime on %s: %s"), daemon->timestamp_file, strerror(errno));
my_syslog(LOG_INFO, _("system time considered valid, now checking DNSSEC signature timestamps.")); my_syslog(LOG_INFO, _("system time considered valid, now checking DNSSEC signature timestamps."));
+2 -2
View File
@@ -304,7 +304,7 @@ static size_t calc_subnet_opt(struct subnet_opt *opt, union mysockaddr *source)
/* http://tools.ietf.org/html/draft-vandergaast-edns-client-subnet-02 */ /* http://tools.ietf.org/html/draft-vandergaast-edns-client-subnet-02 */
int len; int len;
void *addrp; void *addrp = NULL;
int sa_family = source->sa.sa_family; int sa_family = source->sa.sa_family;
opt->source_netmask = 0; opt->source_netmask = 0;
@@ -344,7 +344,7 @@ static size_t calc_subnet_opt(struct subnet_opt *opt, union mysockaddr *source)
len = 0; len = 0;
if (opt->source_netmask != 0) if (addrp && opt->source_netmask != 0)
{ {
len = ((opt->source_netmask - 1) >> 3) + 1; len = ((opt->source_netmask - 1) >> 3) + 1;
memcpy(opt->addr, addrp, len); memcpy(opt->addr, addrp, len);
+54 -54
View File
@@ -120,8 +120,10 @@ static unsigned int search_servers(time_t now, struct all_addr **addrpp, unsigne
unsigned int flags = 0; unsigned int flags = 0;
for (serv = daemon->servers; serv; serv=serv->next) for (serv = daemon->servers; serv; serv=serv->next)
if (qtype == F_DNSSECOK && !(serv->flags & SERV_DO_DNSSEC))
continue;
/* domain matches take priority over NODOTS matches */ /* domain matches take priority over NODOTS matches */
if ((serv->flags & SERV_FOR_NODOTS) && *type != SERV_HAS_DOMAIN && !strchr(qdomain, '.') && namelen != 0) else if ((serv->flags & SERV_FOR_NODOTS) && *type != SERV_HAS_DOMAIN && !strchr(qdomain, '.') && namelen != 0)
{ {
unsigned int sflag = serv->addr.sa.sa_family == AF_INET ? F_IPV4 : F_IPV6; unsigned int sflag = serv->addr.sa.sa_family == AF_INET ? F_IPV4 : F_IPV6;
*type = SERV_FOR_NODOTS; *type = SERV_FOR_NODOTS;
@@ -202,7 +204,7 @@ static unsigned int search_servers(time_t now, struct all_addr **addrpp, unsigne
} }
} }
if (flags == 0 && !(qtype & F_QUERY) && if (flags == 0 && !(qtype & (F_QUERY | F_DNSSECOK)) &&
option_bool(OPT_NODOTS_LOCAL) && !strchr(qdomain, '.') && namelen != 0) option_bool(OPT_NODOTS_LOCAL) && !strchr(qdomain, '.') && namelen != 0)
/* don't forward A or AAAA queries for simple names, except the empty name */ /* don't forward A or AAAA queries for simple names, except the empty name */
flags = F_NOERR; flags = F_NOERR;
@@ -877,10 +879,10 @@ void reply_query(int fd, int family, time_t now)
return; return;
/* Truncated answer can't be validated. /* Truncated answer can't be validated.
If this is an answer to a DNSSEC-generated query, we still If this is an answer to a DNSSEC-generated query, we still
need to get the client to retry over TCP, so return need to get the client to retry over TCP, so return
an answer with the TC bit set, even if the actual answer fits. an answer with the TC bit set, even if the actual answer fits.
*/ */
if (header->hb3 & HB3_TC) if (header->hb3 & HB3_TC)
status = STAT_TRUNCATED; status = STAT_TRUNCATED;
@@ -897,7 +899,7 @@ void reply_query(int fd, int family, time_t now)
status = dnssec_validate_ds(now, header, n, daemon->namebuff, daemon->keyname, forward->class); status = dnssec_validate_ds(now, header, n, daemon->namebuff, daemon->keyname, forward->class);
else else
status = dnssec_validate_reply(now, header, n, daemon->namebuff, daemon->keyname, &forward->class, status = dnssec_validate_reply(now, header, n, daemon->namebuff, daemon->keyname, &forward->class,
option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), NULL, NULL); option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags & SERV_DO_DNSSEC), NULL, NULL);
} }
/* Can't validate, as we're missing key data. Put this /* Can't validate, as we're missing key data. Put this
@@ -933,37 +935,35 @@ void reply_query(int fd, int family, time_t now)
/* Find server to forward to. This will normally be the /* Find server to forward to. This will normally be the
same as for the original query, but may be another if same as for the original query, but may be another if
servers for domains are involved. */ servers for domains are involved. */
if (search_servers(now, NULL, F_QUERY, daemon->keyname, &type, &domain, NULL) == 0) if (search_servers(now, NULL, F_DNSSECOK, daemon->keyname, &type, &domain, NULL) == 0)
{ {
struct server *start = server, *new_server = NULL; struct server *start = server, *new_server = NULL;
type &= ~SERV_DO_DNSSEC;
while (1) while (1)
{ {
if (type == (start->flags & SERV_TYPE) && if (type == (start->flags & (SERV_TYPE | SERV_DO_DNSSEC)) &&
(type != SERV_HAS_DOMAIN || hostname_isequal(domain, start->domain)) && (type != SERV_HAS_DOMAIN || hostname_isequal(domain, start->domain)) &&
!(start->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP))) !(start->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP)))
{ {
new_server = start; new_server = start;
if (server == start) if (server == start)
{ {
new_server = NULL; new_server = NULL;
break; break;
} }
} }
if (!(start = start->next)) if (!(start = start->next))
start = daemon->servers; start = daemon->servers;
if (start == server) if (start == server)
break; break;
} }
if (new_server) if (new_server)
server = new_server; server = new_server;
} }
new->sentto = server; new->sentto = server;
new->rfd4 = NULL; new->rfd4 = NULL;
#ifdef HAVE_IPV6 #ifdef HAVE_IPV6
new->rfd6 = NULL; new->rfd6 = NULL;
@@ -1477,7 +1477,7 @@ static int tcp_key_recurse(time_t now, int status, struct dns_header *header, si
new_status = dnssec_validate_ds(now, header, n, name, keyname, class); new_status = dnssec_validate_ds(now, header, n, name, keyname, class);
else else
new_status = dnssec_validate_reply(now, header, n, name, keyname, &class, new_status = dnssec_validate_reply(now, header, n, name, keyname, &class,
option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags && SERV_DO_DNSSEC), NULL, NULL); option_bool(OPT_DNSSEC_NO_SIGN) && (server->flags & SERV_DO_DNSSEC), NULL, NULL);
if (new_status != STAT_NEED_DS && new_status != STAT_NEED_KEY) if (new_status != STAT_NEED_DS && new_status != STAT_NEED_KEY)
break; break;
@@ -1506,14 +1506,12 @@ static int tcp_key_recurse(time_t now, int status, struct dns_header *header, si
/* Find server to forward to. This will normally be the /* Find server to forward to. This will normally be the
same as for the original query, but may be another if same as for the original query, but may be another if
servers for domains are involved. */ servers for domains are involved. */
if (search_servers(now, NULL, F_QUERY, keyname, &type, &domain, NULL) != 0) if (search_servers(now, NULL, F_DNSSECOK, keyname, &type, &domain, NULL) != 0)
{ {
new_status = STAT_ABANDONED; new_status = STAT_ABANDONED;
break; break;
} }
type &= ~SERV_DO_DNSSEC;
while (1) while (1)
{ {
if (!firstsendto) if (!firstsendto)
@@ -1530,34 +1528,34 @@ static int tcp_key_recurse(time_t now, int status, struct dns_header *header, si
} }
} }
if (type != (server->flags & SERV_TYPE) || if (type != (server->flags & (SERV_TYPE | SERV_DO_DNSSEC)) ||
(type == SERV_HAS_DOMAIN && !hostname_isequal(domain, server->domain)) || (type == SERV_HAS_DOMAIN && !hostname_isequal(domain, server->domain)) ||
(server->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP))) (server->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP)))
continue; continue;
retry: retry:
/* may need to make new connection. */ /* may need to make new connection. */
if (server->tcpfd == -1) if (server->tcpfd == -1)
{ {
if ((server->tcpfd = socket(server->addr.sa.sa_family, SOCK_STREAM, 0)) == -1) if ((server->tcpfd = socket(server->addr.sa.sa_family, SOCK_STREAM, 0)) == -1)
continue; /* No good, next server */ continue; /* No good, next server */
#ifdef HAVE_CONNTRACK #ifdef HAVE_CONNTRACK
/* Copy connection mark of incoming query to outgoing connection. */ /* Copy connection mark of incoming query to outgoing connection. */
if (have_mark) if (have_mark)
setsockopt(server->tcpfd, SOL_SOCKET, SO_MARK, &mark, sizeof(unsigned int)); setsockopt(server->tcpfd, SOL_SOCKET, SO_MARK, &mark, sizeof(unsigned int));
#endif #endif
if (!local_bind(server->tcpfd, &server->source_addr, server->interface, 1) || if (!local_bind(server->tcpfd, &server->source_addr, server->interface, 1) ||
connect(server->tcpfd, &server->addr.sa, sa_len(&server->addr)) == -1) connect(server->tcpfd, &server->addr.sa, sa_len(&server->addr)) == -1)
{ {
close(server->tcpfd); close(server->tcpfd);
server->tcpfd = -1; server->tcpfd = -1;
continue; /* No good, next server */ continue; /* No good, next server */
} }
server->flags &= ~SERV_GOT_TCP; server->flags &= ~SERV_GOT_TCP;
} }
if (!read_write(server->tcpfd, packet, m + sizeof(u16), 0) || if (!read_write(server->tcpfd, packet, m + sizeof(u16), 0) ||
!read_write(server->tcpfd, &c1, 1, 1) || !read_write(server->tcpfd, &c1, 1, 1) ||
@@ -2080,6 +2078,8 @@ static void free_frec(struct frec *f)
#endif #endif
} }
/* if wait==NULL return a free or older than TIMEOUT record. /* if wait==NULL return a free or older than TIMEOUT record.
else return *wait zero if one available, or *wait is delay to else return *wait zero if one available, or *wait is delay to
when the oldest in-use record will expire. Impose an absolute when the oldest in-use record will expire. Impose an absolute
@@ -2126,7 +2126,7 @@ struct frec *get_new_frec(time_t now, int *wait, int force)
/* can't find empty one, use oldest if there is one /* can't find empty one, use oldest if there is one
and it's older than timeout */ and it's older than timeout */
if (oldest && ((int)difftime(now, oldest->time)) >= TIMEOUT) if (!force && oldest && ((int)difftime(now, oldest->time)) >= TIMEOUT)
{ {
/* keep stuff for twice timeout if we can by allocating a new /* keep stuff for twice timeout if we can by allocating a new
record instead */ record instead */
+1 -8
View File
@@ -133,7 +133,6 @@ static int read_leases(time_t now, FILE *leasestream)
void lease_init(time_t now) void lease_init(time_t now)
{ {
FILE *leasestream; FILE *leasestream;
int readok = 0;
leases_left = daemon->dhcp_max; leases_left = daemon->dhcp_max;
@@ -172,7 +171,7 @@ void lease_init(time_t now)
if (leasestream) if (leasestream)
{ {
if (!(readok = read_leases(now, leasestream))) if (!read_leases(now, leasestream))
my_syslog(MS_DHCP | LOG_ERR, _("failed to parse lease database, invalid line: %s %s %s %s ..."), my_syslog(MS_DHCP | LOG_ERR, _("failed to parse lease database, invalid line: %s %s %s %s ..."),
daemon->dhcp_buff3, daemon->dhcp_buff2, daemon->dhcp_buff3, daemon->dhcp_buff2,
daemon->namebuff, daemon->dhcp_buff); daemon->namebuff, daemon->dhcp_buff);
@@ -202,12 +201,6 @@ void lease_init(time_t now)
sprintf(daemon->dhcp_buff, "%d", WEXITSTATUS(rc)); sprintf(daemon->dhcp_buff, "%d", WEXITSTATUS(rc));
die(_("lease-init script returned exit code %s"), daemon->dhcp_buff, WEXITSTATUS(rc) + EC_INIT_OFFSET); die(_("lease-init script returned exit code %s"), daemon->dhcp_buff, WEXITSTATUS(rc) + EC_INIT_OFFSET);
} }
/* Only die if we stopped reading due to a non-parsed line when running script,
this is expected behaviour when reading from a file, if the file was written with IPv6 data
and we are not compiled to understand that. */
if (!readok)
die(_("failed to read lease-init script output"), NULL, EC_FILE);
} }
#endif #endif
+4 -1
View File
@@ -3849,8 +3849,11 @@ err:
{ {
alias = canonicalise_opt(arg); alias = canonicalise_opt(arg);
if (!alias || !target)
ret_err(_("bad CNAME"));
for (new = daemon->cnames; new; new = new->next) for (new = daemon->cnames; new; new = new->next)
if (hostname_isequal(new->alias, arg)) if (hostname_isequal(new->alias, alias))
ret_err(_("duplicate CNAME")); ret_err(_("duplicate CNAME"));
new = opt_malloc(sizeof(struct cname)); new = opt_malloc(sizeof(struct cname));
new->next = daemon->cnames; new->next = daemon->cnames;
+20 -9
View File
@@ -67,7 +67,8 @@ static int pxe_uefi_workaround(int pxe_arch, struct dhcp_netid *netid, struct dh
static void apply_delay(u32 xid, time_t recvtime, struct dhcp_netid *netid); static void apply_delay(u32 xid, time_t recvtime, struct dhcp_netid *netid);
size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index, size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
size_t sz, time_t now, int unicast_dest, int *is_inform, int pxe, struct in_addr fallback, time_t recvtime) size_t sz, time_t now, int unicast_dest, int loopback,
int *is_inform, int pxe, struct in_addr fallback, time_t recvtime)
{ {
unsigned char *opt, *clid = NULL; unsigned char *opt, *clid = NULL;
struct dhcp_lease *ltmp, *lease = NULL; struct dhcp_lease *ltmp, *lease = NULL;
@@ -382,7 +383,7 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
{ {
len = option_uint(opt, offset + 4 , 1); len = option_uint(opt, offset + 4 , 1);
/* Need to take care that bad data can't run us off the end of the packet */ /* Need to take care that bad data can't run us off the end of the packet */
if ((offset + len + 5 <= (option_len(opt))) && if ((offset + len + 5 <= (unsigned)(option_len(opt))) &&
(option_uint(opt, offset, 4) == (unsigned int)o->u.encap)) (option_uint(opt, offset, 4) == (unsigned int)o->u.encap))
for (o2 = offset + 5; o2 < offset + len + 5; o2 += elen + 1) for (o2 = offset + 5; o2 < offset + len + 5; o2 += elen + 1)
{ {
@@ -487,6 +488,13 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
known_id.next = netid; known_id.next = netid;
netid = &known_id; netid = &known_id;
} }
else if (find_config(daemon->dhcp_conf, NULL, clid, clid_len,
mess->chaddr, mess->hlen, mess->htype, NULL))
{
known_id.net = "known-othernet";
known_id.next = netid;
netid = &known_id;
}
if (mess_type == 0 && !pxe) if (mess_type == 0 && !pxe)
{ {
@@ -568,7 +576,7 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
lease_prune(lease, now); lease_prune(lease, now);
lease = NULL; lease = NULL;
} }
if (!address_allocate(context, &mess->yiaddr, mess->chaddr, mess->hlen, tagif_netid, now)) if (!address_allocate(context, &mess->yiaddr, mess->chaddr, mess->hlen, tagif_netid, now, loopback))
message = _("no address available"); message = _("no address available");
} }
else else
@@ -826,9 +834,12 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
else else
mess->siaddr = context->local; mess->siaddr = context->local;
snprintf((char *)mess->file, sizeof(mess->file), if (strchr(service->basename, '.'))
strchr(service->basename, '.') ? "%s" :"%s.%d", snprintf((char *)mess->file, sizeof(mess->file),
service->basename, layer); "%s.%d", service->basename, layer);
else
snprintf((char *)mess->file, sizeof(mess->file),
"%s", service->basename);
option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK); option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK);
option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, htonl(context->local.s_addr)); option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, htonl(context->local.s_addr));
@@ -1029,7 +1040,7 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
else if (have_config(config, CONFIG_DECLINED) && else if (have_config(config, CONFIG_DECLINED) &&
difftime(now, config->decline_time) < (float)DECLINE_BACKOFF) difftime(now, config->decline_time) < (float)DECLINE_BACKOFF)
my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it was previously declined"), addrs); my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it was previously declined"), addrs);
else if (!do_icmp_ping(now, config->addr, 0)) else if (!do_icmp_ping(now, config->addr, 0, loopback))
my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it is in use by another host"), addrs); my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it is in use by another host"), addrs);
else else
conf = config->addr; conf = config->addr;
@@ -1043,11 +1054,11 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
!config_find_by_address(daemon->dhcp_conf, lease->addr)) !config_find_by_address(daemon->dhcp_conf, lease->addr))
mess->yiaddr = lease->addr; mess->yiaddr = lease->addr;
else if (opt && address_available(context, addr, tagif_netid) && !lease_find_by_addr(addr) && else if (opt && address_available(context, addr, tagif_netid) && !lease_find_by_addr(addr) &&
!config_find_by_address(daemon->dhcp_conf, addr) && do_icmp_ping(now, addr, 0)) !config_find_by_address(daemon->dhcp_conf, addr) && do_icmp_ping(now, addr, 0, loopback))
mess->yiaddr = addr; mess->yiaddr = addr;
else if (emac_len == 0) else if (emac_len == 0)
message = _("no unique-id"); message = _("no unique-id");
else if (!address_allocate(context, &mess->yiaddr, emac, emac_len, tagif_netid, now)) else if (!address_allocate(context, &mess->yiaddr, emac, emac_len, tagif_netid, now, loopback))
message = _("no address available"); message = _("no address available");
} }
+7
View File
@@ -526,6 +526,13 @@ static int dhcp6_no_relay(struct state *state, int msg_type, void *inbuff, size_
if (have_config(config, CONFIG_DISABLE)) if (have_config(config, CONFIG_DISABLE))
ignore = 1; ignore = 1;
} }
else if (state->clid &&
find_config(daemon->dhcp_conf, NULL, state->clid, state->clid_len, state->mac, state->mac_len, state->mac_type, NULL))
{
known_id.net = "known-othernet";
known_id.next = state->tags;
state->tags = &known_id;
}
#ifdef OPTION6_PREFIX_CLASS #ifdef OPTION6_PREFIX_CLASS
/* OPTION_PREFIX_CLASS in ORO, send addresses in all prefix classes */ /* OPTION_PREFIX_CLASS in ORO, send addresses in all prefix classes */
+16 -6
View File
@@ -24,7 +24,9 @@
#include <sys/times.h> #include <sys/times.h>
#endif #endif
#if defined(LOCALEDIR) || defined(HAVE_IDN) #if defined(HAVE_LIBIDN2)
#include <idn2.h>
#elif defined(HAVE_IDN)
#include <idna.h> #include <idna.h>
#endif #endif
@@ -134,7 +136,7 @@ static int check_name(char *in)
else if (isascii((unsigned char)c) && iscntrl((unsigned char)c)) else if (isascii((unsigned char)c) && iscntrl((unsigned char)c))
/* iscntrl only gives expected results for ascii */ /* iscntrl only gives expected results for ascii */
return 0; return 0;
#if !defined(LOCALEDIR) && !defined(HAVE_IDN) #if !defined(HAVE_IDN) && !defined(HAVE_LIBIDN2)
else if (!isascii((unsigned char)c)) else if (!isascii((unsigned char)c))
return 0; return 0;
#endif #endif
@@ -184,7 +186,7 @@ int legal_hostname(char *name)
char *canonicalise(char *in, int *nomem) char *canonicalise(char *in, int *nomem)
{ {
char *ret = NULL; char *ret = NULL;
#if defined(LOCALEDIR) || defined(HAVE_IDN) #if defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
int rc; int rc;
#endif #endif
@@ -194,8 +196,15 @@ char *canonicalise(char *in, int *nomem)
if (!check_name(in)) if (!check_name(in))
return NULL; return NULL;
#if defined(LOCALEDIR) || defined(HAVE_IDN) #if defined(HAVE_IDN) || defined(HAVE_LIBIDN2)
if ((rc = idna_to_ascii_lz(in, &ret, 0)) != IDNA_SUCCESS) #ifdef HAVE_LIBIDN2
rc = idn2_to_ascii_lz(in, &ret, IDN2_NONTRANSITIONAL);
if (rc == IDN2_DISALLOWED)
rc = idn2_to_ascii_lz(in, &ret, IDN2_TRANSITIONAL);
#else
rc = idna_to_ascii_lz(in, &ret, 0);
#endif
if (rc != IDNA_SUCCESS)
{ {
if (ret) if (ret)
free(ret); free(ret);
@@ -503,7 +512,8 @@ int parse_hex(char *in, unsigned char *out, int maxlen,
return -1; return -1;
out[i] = strtol(&in[j*2], NULL, 16); out[i] = strtol(&in[j*2], NULL, 16);
mask = mask << 1; mask = mask << 1;
i++; if (++i == maxlen)
break;
if (j < bytes - 1) if (j < bytes - 1)
in[(j+1)*2] = sav; in[(j+1)*2] = sav;
} }