summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Optimise no-action case in rrfilter().all-rr-typeSimon Kelley2023-03-301-0/+3
|
* Add filtering of arbitrary RR-types.Simon Kelley2023-03-298-90/+102
|
* Remove code for caching SRV.Simon Kelley2023-03-286-130/+42
| | | | | | | Function replaced by the ability to cache any RR type. For backwards compatibilty SRV records are always on the list of cacheable RR-types.
* Add --cache-rr to enable caching of arbitrary RR types.Simon Kelley2023-03-239-173/+415
|
* Fold F_NOERR and F_DNSSEC to make space for new F_RR.Simon Kelley2023-03-203-5/+10
|
* Merge branch 'master' into all-rr-typeSimon Kelley2023-03-2020-97/+241
|\
| * Close Debian bug.Simon Kelley2023-03-201-1/+1
| |
| * Add EDE "filtered" extended error when --filter-A or --filter-AAAA act.Simon Kelley2023-03-205-47/+83
| | | | | | | | | | | | | | | | | | If a NODATA answer is returned instead of actual data for A or AAAA queries because of the existence of --filter-A or --filter-AAAA config options, then mark the replies with an EDE "filtered" tag. Basic patch by Petr Menšík, tweaked by Simon Kelley to apply onto the preceding caching patches.
| * More --filter-AAAA caching improvements.Simon Kelley2023-03-202-19/+38
| | | | | | | | Cache answers before filtering and filter coming out of the cache.
| * Improve cache use with --filter-A and --filter-AAAASimon Kelley2023-03-201-0/+20
| | | | | | | | | | | | | | If --filter-AAAA is set and we have cached entry for the domain in question fpr any RR type that allows us to return a NODATA reply when --filter-AAAA is set without going upstream. Similarly for --filter-A.
| * Remove limitation on --dynamic-host.Simon Kelley2023-03-161-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamic-host was implemented to ignore interface addresses with /32 (or /128 for IPv6) prefix lengths, since they are not useful for synthesising addresses. Due to a bug before 2.88, this didn't work for IPv4, and some have used --dynamic-host=example.com,0.0.0.0,eth0 to do the equivalent of --interface-name for such interfaces. When the bug was fixed in 2.88 these uses broke. Since this behaviour seems to violate the principle of least surprise, and since the 2.88 fix is breaking existing imstallations, this commit removes the check on /32 and /128 prefix lengths to solve both problems.
| * Fix DHCPv6 "use multicast" response which previously failedSimon Kelley2023-03-151-2/+4
| | | | | | | | | | | | to set the message type correctly. Thanks to Petr Menšík for spotting the problem.
| * Allow configuring filter-A/AAAA via dbus.Clayton Craft2023-03-082-0/+22
| |
| * Generalise cached NXDOMAIN replies.Simon Kelley2023-03-081-4/+18
| | | | | | | | | | We can cache an NXDOMAIN reply to a query for any RRTYPE and reply from a cached NXDOMAIN to any RRTYPE.
| * Set the default maximum DNS UDP packet size to 1232.Simon Kelley2023-03-073-3/+11
| | | | | | | | | | | | http://www.dnsflagday.net/2020/ refers. Thanks to Xiang Li for the prompt.
| * Bump version in Debian changelog.Simon Kelley2023-03-061-0/+6
| |
| * Fix possible SEGV when no servers defined.Simon Kelley2023-03-062-2/+14
| | | | | | | | | | | | | | | | | | | | If there exists a --address=/<domain>/ or --server=/<domain>/# configuration but no upstream server config unqualified by domain then when a query which doesnt match the domain is recieved it will use the qualfied server config and in the process possibly make an out-of-bounds memory access. Thanks to Daniel Danzberger for spotting the bug.
| * Fix --rev-server option. It was broken in ↵Dominik Derigs2023-03-061-0/+6
| | | | | | | | | | | | 1db9943c6879c160a5fbef885d5ceadd3668b74d when resolving upstream servers by name was extended to --rev-server without accounting for the fact that re-using one and the same upstream server for each of the x.y.z.in-addr.arpa is actually a wanted feature Signed-off-by: DL6ER <dl6er@dl6er.de>
| * Document suppressing deafult options in --dhcp-option.Simon Kelley2023-03-061-1/+9
| |
| * Avoid undefined behaviour with the ctype(3) functions.Taylor R Campbell2023-02-277-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As defined in the C standard: In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined. This is because they're designed to work with the int values returned by getc or fgetc; they need extra work to handle a char value. If EOF is -1 (as it almost always is), with 8-bit bytes, the allowed inputs to the ctype(3) functions are: {-1, 0, 1, 2, 3, ..., 255}. However, on platforms where char is signed, such as x86 with the usual ABI, code like char *arg = ...; ... isspace(*arg) ... may pass in values in the range: {-128, -127, -126, ..., -2, -1, 0, 1, ..., 127}. This has two problems: 1. Inputs in the set {-128, -127, -126, ..., -2} are forbidden. 2. The non-EOF byte 0xff is conflated with the value EOF = -1, so even though the input is not forbidden, it may give the wrong answer. Casting char to int first before passing the result to ctype(3) doesn't help: inputs like -128 are unchanged by this cast. It is necessary to cast char inputs to unsigned char first; you can then cast to int if you like but there's no need because the functions will always convert the argument to int by definition. So the above fragment needs to be: char *arg = ...; ... isspace((unsigned char)*arg) ... This patch inserts unsigned char casts where necessary, and changes int casts to unsigned char casts where the input is char. I left alone int casts where the input is unsigned char already -- they're not immediately harmful, although they would have the effect of suppressing some compiler warnings if the input is ever changed to be char instead of unsigned char, so it might be better to remove those casts too. I also left alone calls where the input is int to begin with because it came from getc; casting to unsigned char here would be wrong, of course.
| * Replace dead link in dnsmasq.conf.example.v2.89Simon Kelley2023-02-021-1/+1
| | | | | | | | Thanks to Timo van Roermund for spotting this.
* | Replace dead link in dnsmasq.conf.example.Simon Kelley2023-02-021-1/+1
|/ | | | Thanks to Timo van Roermund for spotting this.
* Add --no-ident option.v2.89test1Dominik Derigs2023-01-233-25/+38
|
* Add acknowledgements to CHANGELOG for the 2.88 AWS efforts.Simon Kelley2023-01-141-4/+10
|
* Fix Changelog typos.Simon Kelley2023-01-141-2/+2
|
* Bump version in Debian changelog.Simon Kelley2023-01-131-0/+6
|
* Fix bug which can break the invariants on the order of a hash chain.Simon Kelley2023-01-132-6/+24
| | | | | | | | | | | | | | | If there are multiple cache records with the same name but different F_REVERSE and/or F_IMMORTAL flags, the code added in fe9a134b could concievable break the REVERSE-FORWARD-IMMORTAL order invariant. Reproducing this is damn near impossible, but it is responsible for rare and otherwise inexplicable reversion between 2.87 and 2.88 which manifests itself as a cache internal error. All observed cases have depended on DNSSEC being enabled, but the bug could in theory manifest itself without DNSSEC Thanks to Timo van Roermund for reporting the bug and huge efforts to isolate it.
* Fix cosmetic big in dump_cache_entry()Simon Kelley2023-01-041-2/+1
|
* Log all cache internal errors.Simon Kelley2023-01-021-8/+3
|
* If we hit a cache internal error, log the entry we failed to remove.Simon Kelley2022-12-221-82/+97
| | | | | This is code which should never run, but if it does, we now log information useful for debugging.
* Add posix-timezone and tzdb-timezone DHCPv6 options.v2.88Simon Kelley2022-12-041-0/+2
| | | | They are already in place for DHCPv4.
* Handle malformed DNS replies better.v2.88rc5Simon Kelley2022-11-263-17/+32
| | | | | | If we detect that that reply from usptream is malformed, transform it into a SERVFAIL reply before sending to the original requestor.
* Fix warning in cache.cBrad Smith2022-11-261-1/+3
|
* Make max staleness of stale cache entries configurable and default to one day.Dominik Derigs2022-11-265-11/+39
|
* Fix use-after-free in mark_servers()Petr Menšík2022-11-261-3/+5
|
* fixup! Handle DS records for unsupported crypto algorithms.Petr Menšík2022-11-221-1/+1
|
* Merge i18n strings.v2.88rc4Simon Kelley2022-11-2111-5870/+7559
|
* Add /etc/hosts gotcha to man page section for --dhcp-hosts.Simon Kelley2022-11-211-1/+2
|
* Optimise readng large number --server options at start up.Simon Kelley2022-11-213-21/+49
| | | | | | | | | | | When re-reading upstream servers from /etc/resolv.conf or other sources that can change dnsmasq tries to avoid memory fragmentation by re-using existing records that are being re-read unchanged. This involves seaching all the server records for each new one installed. During startup this search is pointless, and can cause long start times with thousands of --server options because the work needed is O(n^2). Handle this case more intelligently. Thanks to Ye Zhou for spotting the problem and an initial patch.
* Fix CHANGELOG typos.Matthias Andree2022-11-181-8/+8
|
* Update german translation for release 2.88.Conrad Kostecki2022-11-171-4/+4
|
* Fix SEGV on --local= added by immediately previous commit.v2.88rc3Simon Kelley2022-11-171-6/+8
|
* Fix struct hostinfo free code and BSD compile.v2.88rc2Simon Kelley2022-11-173-22/+27
| | | | | | | | | | The code added in6 c596f1cc1d92b2b90ef5ce043ace314eefa868b fails to free the returned datastructures from gethostinfo() because sdetails.hostinfo is used to loop through the addresses and ends up NULL. In some libc implementations this results in a SEGV when freeaddrinfo() is called. Also fix FTBFS under BSD. Thanks to Johnny S. Lee for the bug report.
* Handle DS records for unsupported crypto algorithms correctly.v2.88rc1Simon Kelley2022-11-163-24/+44
| | | | | | Such a DS, as long as it is validated, should allow answers in the domain is attests to be returned as unvalidated, and not as a validation error.
* Fix GOST signature algorithms for DNSSEC validation.Simon Kelley2022-11-161-7/+9
| | | | | | | | Use CryptoPro version of the hash function. Handle the little-endian wire format of key data. Get the wire order of S and R correct. Note that Nettle version 3.6 or later is required for GOST support.
* Handle known DNSSEC signature algorithms which are not supported.Simon Kelley2022-11-131-1/+12
| | | | | | | | | | This fixes a confusion if certain algorithms are not supported because the version is the crypto library is too old. The validation should be treated the same as for a completely unknown algorithm, (ie return unverified answer) and not as a validation failure (ie return SERVFAIL). The algorithems affected are GOST and ED448.
* Fix --server=/domain/#v2.88test3Simon Kelley2022-11-071-2/+4
|
* Fix --server with multiple domains.Simon Kelley2022-11-071-17/+20
|
* Make specifying nameservers by name work for DBus API.Simon Kelley2022-11-073-19/+59
|
* Call freeaddrinfo() in domain_rev[46]()Simon Kelley2022-11-071-0/+6
|