summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add ClearMetrics Dbus method.awsSimon Kelley2022-09-164-3/+34
|
* Optimise cache code when stale caching in use.Simon Kelley2022-09-161-4/+9
| | | | Exclude DNSSEC entries from stale caching.
* Don't exclude stale-cache answers from "local answered" metric.Simon Kelley2022-09-161-1/+3
|
* Initialise modified-moving-average latency calc better.Simon Kelley2022-09-161-1/+4
| | | | | Use the first value, rather than initialising at zero, which takes many queries to converge.
* Split failed queries in retries in stat counting.Simon Kelley2022-09-164-6/+11
|
* Tweak server-selection logic in the fast-retry case.Simon Kelley2022-09-151-7/+8
|
* Keep a per-DNS-server moving average of query latency.Simon Kelley2022-09-154-8/+22
|
* Combine server stats from all records for the same server in DBUS method.Simon Kelley2022-09-151-18/+31
| | | | | | The DBUS per-server stats method should combine the stats from different records (for different domains) in the same way at the logging code.
* Count NXDOMAIN replies from each server.Simon Kelley2022-09-154-5/+12
|
* Add metric for queries which never see an answer.Simon Kelley2022-09-153-0/+4
|
* Make fast-retry more configurable and do exponential backoff.Simon Kelley2022-09-155-18/+40
|
* Remove unused vars.Simon Kelley2022-09-131-1/+1
|
* Return EDE_STALE extended error when returning stale data from cache.Simon Kelley2022-09-121-1/+14
|
* Add stale cache replies to metrics.Simon Kelley2022-09-124-1/+5
|
* Add GetServerMetrics method to DBus interface.Simon Kelley2022-09-122-0/+62
|
* Further optimisation of --port-limit.Simon Kelley2022-09-094-15/+64
| | | | | | | | No longer try and fail to open every port when the port range is in complete use; go straight to re-using an existing socket. Die at startup if port range is smaller than --port-limit, since the code behaves badly in this case.
* Second try at port-limit option.Simon Kelley2022-09-094-23/+50
| | | | | | | | | | | | | | | | 1) It's expected to fail to bind a new source port when they are scarce, suppress warning in log in this case. 2) Optimse bind_local when max_port - min_port is small. There's no randomness in this case, so we try all possible source ports rather than poking at random ones for an arbitrary number of tries. 3) In allocate_rfd() handle the case that all available source ports are already open. In this case we need to pick an existing socket/port to use, such that it has a different port from any we already hold. This gives the required property that the set of ports utilised by any given query is set by --port-limit and we don't re-use any until we have port-limit different ones.
* Fix namebuff overwrite leading to wrong log after socket bind warning.Simon Kelley2022-09-091-3/+3
|
* Remove fast-retry development logging.Simon Kelley2022-09-061-3/+0
|
* Add --use-stale-cache option.Simon Kelley2022-09-068-76/+238
|
* Add --fast-dns-retry option.Simon Kelley2022-09-067-44/+166
| | | | | | | This gives dnsmasq the ability to originate retries for upstream DNS queries itself, rather than relying on the downstream client. This is most useful when doing DNSSEC over unreliable upstream network. It comes with some cost in memory usage and network bandwidth.
* Add --port-limit option.Simon Kelley2022-09-064-11/+64
| | | | | | | | | By default, when sending a query via random ports to multiple upstream servers or retrying a query dnsmasq will use a single random port for all the tries/retries. This option allows a larger number of ports to be used, which can increase robustness in certain network configurations. Note that increasing this to more than two or three can have security and resource implications and should only be done with understanding of those.
* Add DHCPv4 option 108 "ipv6-only" to the options table.v2.87rc1Simon Kelley2022-09-061-0/+1
|
* Fix logic when a SERVFAIL reply is received after good replt for DNSSEC.Simon Kelley2022-09-061-3/+6
| | | | | If we get a SERVFAIL or REFUSED answer to a DNSSEC query for which we already have a good answer, just ignore it.
* Add source address to RA packet dumps.Simon Kelley2022-09-061-1/+7
|
* Fix DHCPv6 relay to use a more sensble source address.Simon Kelley2022-09-062-15/+10
| | | | | | | Tweak things so that packets relayed towards a server have source address on the server-facing network, not the client-facing network. Thanks to Luis Thomas for spotting this and initial patch.
* Free sockets awaiting upstream DNS replies ASAP.Simon Kelley2022-09-061-0/+7
| | | | | | Once we have a good answer, close the socket so that the fd can be reused during DNSSEC validation and we don't have to read and discard more replies from other servers.
* Tweak packet dump code to make port numbers more accurate.Simon Kelley2022-09-058-84/+120
| | | | Also add query-ids with log-queries=extra.
* Simplify realloc use in poll.cSimon Kelley2022-08-111-12/+4
|
* Introduce whine_reallocPetr Menšík2022-08-116-24/+24
| | | | | | | | | | | Move few patters with whine_malloc, if (successful) copy+free, to a new whine_realloc. It should do the same thing, but with a help from OS it can avoid unnecessary copy and free if allocation of more data after current data is possible. Added few setting remanining space to 0, because realloc does not use calloc like whine_malloc does. There is no advantage of zeroing what we will immediately overwrite. Zero only remaining space.
* CHANGELOG typo.v2.87test9Simon Kelley2022-08-081-1/+1
|
* Fix bad interaction between --address=/#/<ip> and --server=/some.domain/#Simon Kelley2022-08-082-6/+17
| | | | | This would return <ip> for queries in some.domain, rather than forwarding the query via the default server(s) read from /etc/resolv.conf.
* Bound the value of UDP packet size in the EDNS0 header ofBertie, Taylor2022-07-312-2/+12
| | | | | | forwarded queries to the configured or default value of edns-packet-max. There's no point letting a client set a larger value if we're unable to return the answer.
* Update man page on DHCP data provided to scripts. Provide requested options ↵Simon Kelley2022-07-314-15/+27
| | | | for DHCPv6 also.
* Fix bit-rotted data handling code for LUA scripts.Simon Kelley2022-07-313-15/+14
|
* Tidy last two commits.Simon Kelley2022-07-312-25/+14
|
* Pass MUD URLs (RFC 8520) supplied via DHCPv4 to DHCP scriptsKevin Yeich2022-07-293-0/+11
| | | | | | | | | | Extract Manufacturer Usage Description (MUD) URL from DHCP Option 161 and make it available to DHCP scripts as DNSMASQ_MUD_URL. See https://datatracker.ietf.org/doc/html/rfc8520#section-17.3 and https://datatracker.ietf.org/doc/html/rfc8520#section-10 Co-authored-by: Jasper Wiegratz <wiegratz@uni-bremen.de>
* Pass MUD URLs (RFC 8520) supplied via DHCPv6 to DHCP scriptsHugo Hakim Damer2022-07-293-2/+15
| | | | | | | | | | | | | | Extract Manufacturer Usage Description (MUD) URL from DHCP Option 112 and make it available to DHCP scripts as DNSMASQ_MUD_URL. This expands on the initial support for Manufacturer Usage Description URLs that has been added in the previous commit for DHCPv4 by also supporting MUD URLs supplied using DHCPv6. See https://datatracker.ietf.org/doc/html/rfc8520#section-17.3 and https://datatracker.ietf.org/doc/html/rfc8520#section-10 Co-authored-by: Jasper Wiegratz <wiegratz@uni-bremen.de>
* Merge branch 'master' of ssh://thekelleys.org.uk/var/local/git/dnsmasqSimon Kelley2022-07-1912-34/+73
|\
| * Fix comment typo.Simon Kelley2022-07-191-1/+1
| |
| * Fix parsing of IPv6 addresses with peer from netlink.Beniamino Galvani2022-05-271-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the most common case, an IPv6 address doesn't have a peer and the IFA_ADDRESS netlink attribute contains the address itself. But if the address has a peer (typically for point to point links), then IFA_ADDRESS contains the peer address and IFA_LOCAL contains the address [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv6/addrconf.c?h=v5.17#n5030 Fix the parsing of IPv6 addresses with peers, as currently dnsmasq unsuccessfully tries to bind on the peer address. A simple reproducer is: dnsmasq --conf-file=/dev/null -i dummy1 -d --bind-dynamic & sleep 2 ip link add dummy1 type dummy ip link set dummy1 up ip addr add dev dummy1 fd01::1/64 peer fd01::2/64 ip addr add dev dummy1 fd01::42/64 sleep 2 ss -lnp | grep dnsmasq | grep fd01 Before the patch: dnsmasq: failed to create listening socket for fd01::2: Cannot assign requested address dnsmasq: failed to create listening socket for fd01::2: Cannot assign requested address udp UNCONN 0 [fd01::42]:53 [::]:* users:(("dnsmasq",pid=23947,fd=14)) tcp LISTEN 0 [fd01::42]:53 [::]:* users:(("dnsmasq",pid=23947,fd=15 After: udp UNCONN 0 [fd01::42]:53 [::]:* users:(("dnsmasq",pid=23973,fd=16)) udp UNCONN 0 [fd01::1]:53 [::]:* users:(("dnsmasq",pid=23973,fd=14)) tcp LISTEN 0 [fd01::42]:53 [::]:* users:(("dnsmasq",pid=23973,fd=17)) tcp LISTEN 0 [fd01::1]:53 [::]:* users:(("dnsmasq",pid=23973,fd=15))
| * Add the ability to specify destination port in DHCP-relay mode.Simon Kelley2022-05-267-7/+36
| | | | | | | | | | | | | | | | | | This change also removes a previous bug where --dhcp-alternate-port would affect the port used to relay _to_ as well as the port being listened on. The new feature allows configuration to provide bug-for-bug compatibility, if required. Thanks to Damian Kaczkowski for the feature suggestion.
| * Fix outdated comment.Simon Kelley2022-05-261-1/+1
| |
| * Update GNU GPL file.Petr Menšík2022-05-131-22/+21
| |
| * Also log upstream port for dnssec-retryDominik Derigs2022-04-181-2/+2
| | | | | | | | Signed-off-by: DL6ER <dl6er@dl6er.de>
| * Add inode compare while checking resolv file change袁建鹏2022-04-182-1/+3
| | | | | | | | | | | | | | | | | | | | | | Fix a bug found on OpenWrt when IPv4/6 dual stack enabled: The resolv file is located on tmpfs whose mtime resolution is 1 second. If the resolv file is updated twice within one second dnsmasq may can't notice the second update. netifd updates the resolv file with method: write temp then move, so adding an inode check fixes this bug.
* | Fix comment typo.Simon Kelley2022-07-071-1/+1
|/
* Fix write-after-free error in DHCPv6 code. CVE-2022-0934 refers.Simon Kelley2022-03-312-21/+30
|
* Add DNSMASQ_DATA_MISSING envvar to lease-change script.Simon Kelley2022-03-222-1/+13
|
* Manpage update for --localise-queries.Simon Kelley2022-03-051-1/+2
| | | | Thanks to Leonardo Romor for the suggestion.