Re: [Dnsmasq-discuss] logging DHCPDISCOVER

2023-02-10 Thread Simon Kelley
If you set the log-dhcp option in the dnsmasq config, it will log all the options being sent to the client, which should include a copy of the vendor-class received from the client. Cheers, Simon. On 09/02/2023 20:54, Carl Karsten wrote: I want to gather stats on how often I don't get a

Re: [Dnsmasq-discuss] Can't get tags to apply with dhcp-circuitid

2023-02-10 Thread Simon Kelley
Luckily, we have the complete data being added by the relay option: 82 agent-id 01:04:00:64:00:02:02:06:5c:f4:ab:af:6f:9c That's at circuit-ID (01) of length four (04) value 00:64:00:02 and a remote-id (02) length six (06) value 5c:f4:ab:af:6f:9c So you can either match against the remote-id

Re: [Dnsmasq-discuss] dnsmasq (pihole) caching of HTTPS requested

2023-02-06 Thread Simon Kelley
On 31/01/2023 12:01, Petr Menšík wrote: On 19. 01. 23 11:57, Simon Kelley wrote: Addendum. I just looked at the latest draft (11) rather than draft zero whixh was linked here. That makes it clear that the additional processing is optional, so simply caching SVCB recpords might be a usable

[Dnsmasq-discuss] Announce: dnsmasq-2.89.

2023-02-06 Thread Simon Kelley
I just released dnsmasq 2.89. This is a small update on 2.88, mainly to fix a problem introduced in that release. It's in theory a nasty problem, but rather difficult to reproduce, and has only turned up "in the wild" in one report, so that rather reduces the priority. Nevertheless, I'd lik

Re: [Dnsmasq-discuss] FOSDEM meeting

2023-01-31 Thread Simon Kelley
It's a long time since I visited FOSDEM. I won't be there this year, but I'd consider a trip next year. Cheers, Simon. On 30/01/2023 18:25, Petr Menšík wrote: Dear developers and users, Already this weekend will be FOSDEM conference. I will be there, because also DNS dev room [2] would be p

Re: [Dnsmasq-discuss] [PATCH] Add run-time option to disable CHAOS TXT records

2023-01-25 Thread Simon Kelley
2023-01-16 at 22:46 +0000, Simon Kelley wrote: The patch moves the relevant code to after processing of command-line arguments, but not reading configuration file(s). I can't think of any reason why you wouldn't want to put no-ident into /etc/dnsmasq.conf Have I missed something?

Re: [Dnsmasq-discuss] dnsmasq (pihole) caching of HTTPS requested

2023-01-19 Thread Simon Kelley
On 19/01/2023 10:53, Simon Kelley wrote: From a quick scan of the draft, this is not trivial. It looks like one form of the record is effectively a re-implementation of CNAME, and all replies have lots of extra processing. It's not simply a case of adding the ability to store a new R

Re: [Dnsmasq-discuss] dnsmasq (pihole) caching of HTTPS requested

2023-01-19 Thread Simon Kelley
From a quick scan of the draft, this is not trivial. It looks like one form of the record is effectively a re-implementation of CNAME, and all replies have lots of extra processing. It's not simply a case of adding the ability to store a new RRtype in the cache; replies to queries for that typ

Re: [Dnsmasq-discuss] [PATCH] Add run-time option to disable CHAOS TXT records

2023-01-16 Thread Simon Kelley
The patch moves the relevant code to after processing of command-line arguments, but not reading configuration file(s). I can't think of any reason why you wouldn't want to put no-ident into /etc/dnsmasq.conf Have I missed something? Cheers, Simon. On 15/01/2023 08:01, Dominik Derigs wr

[Dnsmasq-discuss] heads-up: problem in 2.88

2023-01-13 Thread Simon Kelley
I've just resolved a problem that's been reported to me off-list. It turns out that 1) This is a bug introduced in 2.88 2) If it's triggered, it's bad: dnsmasq logs about cache internal error and the DNS subsystem becomes broken. 3) Actually triggering the bug is pretty unlikely: I've only seen

Re: [Dnsmasq-discuss] listening on multiple ports at the same time

2022-12-06 Thread Simon Kelley
That's not supported. Multiple processes is the best way to go. Simon. On 06/12/2022 18:51, Gordon Shawn wrote: can dnsmasq listen on different ports(e.g. 53, 5353,5354,5355) in the same time with a single process running? each port can have its own configuration. so far I invoke multiple dn

[Dnsmasq-discuss] Announce: dnsmasq-2.88

2022-12-04 Thread Simon Kelley
I just released dnsmasq version 2.88 CHANGELOG below. Cheers, Simon. Fix bug in --dynamic-host when an interface has /16 IPv4 address. Thanks to Mark Dietzer for spotting this. Add --fast-dns-retry option. This gives dnsmasq the ability to originate retries fo

Re: [Dnsmasq-discuss] Feature request: DHCP options 100 and 101

2022-12-04 Thread Simon Kelley
On 29/11/2022 23:11, Joe Pfeiffer wrote: Thanks -- the particular phrase in the man page that confused me (I actually had read it) was The set of option-names known by dnsmasq can be discovered by running "dnsmasq --help dhcp". For example, to set the default route option to 192.1

Re: [Dnsmasq-discuss] Feature request: DHCP options 100 and 101

2022-12-04 Thread Simon Kelley
On 29/11/2022 23:11, Joe Pfeiffer wrote: Thanks -- the particular phrase in the man page that confused me (I actually had read it) was The set of option-names known by dnsmasq can be discovered by running "dnsmasq --help dhcp". For example, to set the default route option to 192.1

Re: [Dnsmasq-discuss] Maximum concurrent tcp dns requests with dnsmasq

2022-12-02 Thread Simon Kelley
second to be answered [1]. This gets worse with the number of requests. Are there any tunables which could improve this? Regards Jan [1] root@8cb67b32dabb:/# dnsmasq --version Dnsmasq version 2.86 Copyright (c) 2000-2021 Simon Kelley Compile time options: IPv6 GNU-getopt DBus no-UBus i18n IDN2 DHCP

Re: [Dnsmasq-discuss] dnsmasq mishandles some cases when bad dns response packet is received

2022-11-26 Thread Simon Kelley
On 24/11/2022 02:40, zhangjiangyu via Dnsmasq-discuss wrote: Hi, On 24/11/2022 06:22, Simon via Dnsmasq-discuss wrote: On 23/11/2022 02:56, zhangjiangyu via Dnsmasq-discuss wrote: Hi, On 23/11/2022 07:21, Simon via Dnsmasq-discuss wrote: The main argument for this seems to be a security

Re: [Dnsmasq-discuss] failed to read symlink-files added by `list addnhosts '/etc/safe-search/enabled'`

2022-11-26 Thread Simon Kelley
Does the openwrt config use --hostsdir to read all the files in a directory automatically when they change? The inotify code has explicit handling for the case that an argument to --hostdir is a symlink, so there's a chance that's botched somewhere. Note that's a symlink in the path to the dir

Re: [Dnsmasq-discuss] [PATCH] Make use-stale-cache configurable

2022-11-26 Thread Simon Kelley
On 24/11/2022 19:22, Dominik Derigs wrote: Hey Simon, We observed a few cache oddities with the current release- candidate of dnsmasq and have been able to pin this down to the use of the new use-stale-cache option. The issue happens with cached content being served when the actual domain dat

Re: [Dnsmasq-discuss] [PATCH] Optimize speed on massive server=/.../... records

2022-11-26 Thread Simon Kelley
rk_servers() cleanup of local_domains is using serv->next after it has freed serv. Use additional variable just like in cleanup_servers(). Patch attached. On 11/21/22 23:22, Simon Kelley wrote: Thanks for this. It was in my mind that vary large number of domains would be --local=/domain/

Re: [Dnsmasq-discuss] dnsmasq mishandles some cases when bad dns response packet is received

2022-11-23 Thread Simon Kelley
On 23/11/2022 02:56, zhangjiangyu via Dnsmasq-discuss wrote: Hi, On 23/11/2022 07:21, Simon via Dnsmasq-discuss wrote: The main argument for this seems to be a security one: the client may not handle a malformed packet, and a suitably crafted malformed packet may compromise the client with

Re: [Dnsmasq-discuss] dnsmasq mishandles some cases when bad dns response packet is received

2022-11-22 Thread Simon Kelley
On 22/11/2022 06:47, zhangjiangyu via Dnsmasq-discuss wrote: Hi, On 22/11/2022 07:00:26; Simon Kelley via Dnsmasq-discuss wrote: This behaviour arises from the way dnsmasq works. It doesn't attempt to completely parse the reply packet, it just sends it bit-for-bit to the original requ

Re: [Dnsmasq-discuss] [PATCH] Make ECC-GOST optional only

2022-11-22 Thread Simon Kelley
11/16/22 18:23, Simon Kelley wrote: On 10/11/2022 17:02, Petr Menšík wrote: Hi! I were testing my builds on rootcanary.org test, where dnsmasq is the only one failing with DNSSEC validation enabled. I am not sure why, I think gost crypto algorithm might be broken intentionally on Fedora or RHE

Re: [Dnsmasq-discuss] dnsmasq mishandles some cases when bad dns response packet is received

2022-11-21 Thread Simon Kelley
This behaviour arises from the way dnsmasq works. It doesn't attempt to completely parse the reply packet, it just sends it bit-for-bit to the original requestor. This has the advantage dnsmasq as a DNS forwarder is transparent: new packet formats or data types that it doesn't understand are st

Re: [Dnsmasq-discuss] [PATCH] Optimize speed on massive server=/.../... records

2022-11-21 Thread Simon Kelley
Thanks for this. It was in my mind that vary large number of domains would be --local=/domain/ or --address=/domain/, not forwarding to servers. I've applied something that looks very like your patch, but with cosmetic code changes. Cheers, Simon. On 20/11/2022 05:50, Ye Zhou wrote: Hi al

Re: [Dnsmasq-discuss] v2.88rc2 segmentation fault with config "local=//"

2022-11-17 Thread Simon Kelley
Thanks for testing these builds. That's a genuine problem. Fixed in 2.88rc3, in git now. Cheers, Simon. On 17/11/2022 18:26, Johnny S. Lee via Dnsmasq-discuss wrote: "local=//" means "Do not forward unqualified names to any upstream servers", right? It has not generated any kind of error unt

Re: [Dnsmasq-discuss] v2.88rc1 build errors on BSD

2022-11-17 Thread Simon Kelley
Thanks. Testing on BSD revealed a bug in that new code on all platforms (It calls freeaddrinfo(NULL) ) but on BSD that crashes. 2.88rc should fix all of this. Cheers, Simon. On 16/11/2022 23:56, Johnny S. Lee via Dnsmasq-discuss wrote: Adding 'sdetails->' to all three of them se

Re: [Dnsmasq-discuss] [PATCH] Make ECC-GOST optional only

2022-11-16 Thread Simon Kelley
On 10/11/2022 17:02, Petr Menšík wrote: Hi! I were testing my builds on rootcanary.org test, where dnsmasq is the only one failing with DNSSEC validation enabled. I am not sure why, I think gost crypto algorithm might be broken intentionally on Fedora or RHEL for legal reason. But I have te

Re: [Dnsmasq-discuss] Reserved IP Addresses for Specific DHCP Clients without a Connection to the Subnet

2022-10-31 Thread Simon Kelley
substituted an o for 0 or something similar. Too late now, it is what it is. Simon. -Rich On Thu, Oct 27, 2022 at 6:49 AM Simon Kelley <mailto:si...@thekelleys.org.uk>> wrote: On 27/10/2022 01:34, Rich Otero wrote: > Thanks for the reply. > > My firs

Re: [Dnsmasq-discuss] dnsmasq: dhcp-server with disabled dns-server: /etc/hosts ignored

2022-10-31 Thread Simon Kelley
On 21/10/2022 22:23, Michael Traxler wrote: Hello, dnsmasq-2.87: It took me quite some time to figure this out :-) When you disable the DNS-server via port=0 the /etc/hosts file is ignored and also the addn-hosts= is ignored. This then results in the problem, that the DHCP-server still wo

Re: [Dnsmasq-discuss] DNS recursion only works in debug mode

2022-10-31 Thread Simon Kelley
On 31/10/2022 14:59, Matus UHLAR - fantomas via Dnsmasq-discuss wrote: Hello, I have upgraded my router which included upgrading dnsmasq 2.80 to 2.86. (Turris OS 5.4.4 based on openwrt 19 to 6.0.1 based on OpenWrt 21.02.05) in the current version, dnsmasq returns REFUSED for external lookups

Re: [Dnsmasq-discuss] Multiple Shared Networks?

2022-10-31 Thread Simon Kelley
On 31/10/2022 14:15, Rich Otero via Dnsmasq-discuss wrote: My dnsmasq server provides DHCP for more than one hundred subnets like this: dhcp-range=set:172.18.14.0-24,172.18.14.0,static,255.255.255.0 dhcp-option=tag:172.18.14.0-24,option:router,172.18.14.1 dhcp-range=set:172.18.15

Re: [Dnsmasq-discuss] Reserved IP Addresses for Specific DHCP Clients without a Connection to the Subnet

2022-10-27 Thread Simon Kelley
On 27/10/2022 11:49, Simon Kelley wrote: When I first tried this, I had the dhcp-rapid-commit option set, and strange things were happening, which I'll look into now, so make sure you don't have that. (I might have found a bug for my efforts). I did indeed find a bug, and if

Re: [Dnsmasq-discuss] Reserved IP Addresses for Specific DHCP Clients without a Connection to the Subnet

2022-10-27 Thread Simon Kelley
who has [172.18.15.1]" and there will be no answer, because [172.18.15.1] is no longer on that network segment, it's been moved "upstream". But 172.18.15.1 /is/ in the same segment. It's the address of the VLAN 199 interface of usb-ms01. Hosts at the bottom of the diagr

Re: [Dnsmasq-discuss] Reserved IP Addresses for Specific DHCP Clients without a Connection to the Subnet

2022-10-26 Thread Simon Kelley
On 25/10/2022 19:14, Rich Otero via Dnsmasq-discuss wrote: We have an Ubuntu v16.04.5 server with dnsmasq v2.75. The server acts as a router for approximately 140 IP subnets and dnsmasq provides DHCP and DNS for those subnets. The server has two network interfaces, which are basically an "ups

Re: [Dnsmasq-discuss] Problem with dynamic upstream nameservers in dnsmasq 2.87

2022-10-17 Thread Simon Kelley
#x27;m not sure if it's the IPv6 address or the number of nameservers, but the problem only happens when lan.example.net has both IPv4 and IPv6 nameservers. Hopefully, this will help you track down the issue.  Thanks for your help. On 10/13/22 09:36, Simon Kelley wrote: On 10/10/2022 00:2

Re: [Dnsmasq-discuss] Fwd: Fwd: [PATCH] Addressing hostsdir shortcomings

2022-10-16 Thread Simon Kelley
Forwarded Message From: Dominik Derigs To: dnsmasq-discuss@lists.thekelleys.org.uk , Simon Kelley Subject: Fwd: [PATCH] Addressing hostsdir shortcomings Date: Sat, 02 Apr 2022 21:32:30 +0200 Dear Simon, Second resubmission of my patches. They still apply cleanly to current

Re: [Dnsmasq-discuss] Problem with dynamic upstream nameservers in dnsmasq 2.87

2022-10-13 Thread Simon Kelley
On 10/10/2022 00:21, Christopher J. Madsen wrote: I have configured dnsmasq and openresolv as described in https://unix.stackexchange.com/a/575449/2421 so that the DNS servers provided by the VPN are only used for the domains on that network. With dnsmasq 2.86 and openresolv 3.12.0 this was

Re: [Dnsmasq-discuss] [BUG] dnsmasq "dynamic-hosts" ignores /16 IPv4 addresses on interfaces entirely

2022-10-13 Thread Simon Kelley
On 09/10/2022 06:12, Mark Dietzer wrote: Disregard that previous reply, for some reason it spuriously worked (maybe keepalived temporarily lost my /32 addresses on the interface I am using). Either way, something is broken. My full setup, in case it matters, is that I have interfaces with a

[Dnsmasq-discuss] Announce: dnsmasq-2.87.

2022-09-25 Thread Simon Kelley
I just pushed the long-awaited 2.87 release. Release notes below. Enjoy! Simon. version 2.87 Allow arbitrary prefix lengths in --rev-server and --domain=,local Replace --address=/#/. functionality which got missed in the 2.86 domain search rewrite.

Re: [Dnsmasq-discuss] dnsmasq On Subnets - Failing

2022-09-24 Thread Simon Kelley
On 23/09/2022 13:20, Zeta Cloud wrote: Hi. I'm running dnsmasq as the local DHCP server in a container/VM/jail intended to serve as a router for multiple VMs, and the router VM is set up with multiple vnics, each on a different subnet. vnic1: Subnet A -> 192.168.11.0 (external) vnic2: Sub

Re: [Dnsmasq-discuss] min-cache-ttl overriding neg-ttl

2022-09-21 Thread Simon Kelley
On 20/09/2022 23:54, Glenn Fowler wrote: Hi, I am caching positive responses for 40 minutes (min-cache-ttl), but want negative responses cached for only 1 minute. If the forward zone server is down momentarily, all of the queries during that time could result in an erroneous negative respon

Re: [Dnsmasq-discuss] dnsmasq spins at 100% as soon as network is lost

2022-09-21 Thread Simon Kelley
On 20/09/2022 15:32, bru red wrote: dnsmasq version: 2.86 OS, distro: linux, slackware 15.0 i use dnsmasq to provide dhcp for a tap interface. When i wake the computer up from sleep state, 80% or 90% chances are that it will spin at 100% cpu. I've heard that it might  be related to the fact t

Re: [Dnsmasq-discuss] Trouble with local domains being forwarded to upstream dns servers

2022-09-18 Thread Simon Kelley
On 18/09/2022 17:21, Bryan Walton (dnsmasq) via Dnsmasq-discuss wrote: I'm having trouble with Dnsmasq forwarding requests for some local domains, even when I have them configured in my dnsmasq.conf.  Here is what I have in my config: # Add local-only domains here, queries in these domains a

Re: [Dnsmasq-discuss] Uppercase queries are forwarded differently depending on the protocol (tcp vs udp)

2022-09-16 Thread Simon Kelley
27.0.0.1 dnsmasq[1484740]: 103 127.0.0.1/35249 <http://127.0.0.1/35249> forwarded example.COM to 127.0.0.1 On Thu, Sep 15, 2022 at 10:59 AM Simon Kelley mailto:si...@thekelleys.org.uk>> wrote: On 14/09/2022 22:32, Dmitry Pasiukevich via Dnsmas

Re: [Dnsmasq-discuss] Uppercase queries are forwarded differently depending on the protocol (tcp vs udp)

2022-09-15 Thread Simon Kelley
On 14/09/2022 22:32, Dmitry Pasiukevich via Dnsmasq-discuss wrote: Hi, TLDR: DNS request to dnsmasq with upper-case domain is handled differently if request is sent over TCP vs UDP I run a server to forward "cluster.local" queries to another process: /usr/sbin/dnsmasq-k--cache-size=1000--no

Re: [Dnsmasq-discuss] Snapshot archives downloaded from gitweb are not versioned properly

2022-09-14 Thread Simon Kelley
master, origin/master, origin/HEAD)' ' (tag: v2.87rc1)' '' '' '' '' '' '' '' ' (tag: v2.87test9)' $ git log -10 --format="'%(describe)'" 'v2.87rc1-1-gc4b9bc6' 'v2.87rc1'

Re: [Dnsmasq-discuss] Snapshot archives downloaded from gitweb are not versioned properly

2022-09-13 Thread Simon Kelley
On 13/09/2022 09:10, Johnny S. Lee via Dnsmasq-discuss wrote: How about something like the following? diff --git a/VERSION b/VERSION index 998eb1f..29a22f8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -$Format:%d$ +$Format:%d;%(describe)$ diff --git a/bld/get-version b/bld/get-version index

Re: [Dnsmasq-discuss] Snapshot archives downloaded from gitweb are not versioned properly

2022-09-12 Thread Simon Kelley
The current format is %d, which is "ref names, like the --decorate option of git-log[1]" according to git help log. I'm not clear what the difference between that and %(describe) is. The substituted value is used subtly in get-version as part of the build-process, so we need to be a little

Re: [Dnsmasq-discuss] dnsmasq has started crashing rather frequently

2022-09-08 Thread Simon Kelley
On 05/09/2022 20:07, Chris Green wrote: I am running dnsmasq version 2.86 on xubuntu 22.04. Just recently (i.e. in the past few weeks) it has started crashing with a segfault. The syslog has the following:- Sep 5 19:43:14 t470 dnsmasq[13183]: no servers found in /run/NetworkManager/n

Re: [Dnsmasq-discuss] [PATCH] fix the source address of dhcpv6 relay-forward packets

2022-09-08 Thread Simon Kelley
On 07/09/2022 10:10, Luis Thomas wrote: On Tue, 2022-09-06 at 13:24 +0100, Simon Kelley wrote: CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender > and know the content is safe. On 02/09/2022 14:03, L

Re: [Dnsmasq-discuss] same DHCP client on multiple interfaces

2022-09-08 Thread Simon Kelley
On 08/09/2022 07:08, Hamish Moffatt wrote: So, I got the suggestion off-list to set the DHCP client-id uniquely for each connection. This fixed IPv4, even without matching on the client ID in the config, because dnsmasq is tracking both separately in the leases file. Leases (just IPv4) sho

[Dnsmasq-discuss] 2.87 release.

2022-09-08 Thread Simon Kelley
I propose to begin the process to release the current development code as 2.87. As list-members may be aware, I've been somewhat absent from post for the past six months, and I'm aware that there are known bugs and pending patches which I've not attended to, and some I may even have forgotten

Re: [Dnsmasq-discuss] 'dnsmasq_client_id' not always present on dhcp-scripts

2022-09-06 Thread Simon Kelley
On 06/09/2022 17:23, Taylor Fox wrote: Hello, I am trying to write a script for logging & notification whenever a new DHCP lease is issued, and I currently have a script that uses the `dnsmasq_client_id` environment variable to get the MAC address of the device that the lease was issue

Re: [Dnsmasq-discuss] [PATCH] fix the source address of dhcpv6 relay-forward packets

2022-09-06 Thread Simon Kelley
On 02/09/2022 14:03, Luis Thomas wrote: Hi everyone, We are using both dnsmasq and isc dhcrelay as dhcp-relays for dhcpv6 only. we launch dnsmasq like this: dnsmasq -d \ --conf-file=/dev/null \ --dhcp-relay fd12:3456::b6e3:f9ff:fea5:fa5b,2020:abcd::1 \ --excep

Re: [Dnsmasq-discuss] DNSMasq with high Send/Receive buffers

2022-08-25 Thread Simon Kelley
We've been here before. https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2022q2/016324.html Simon. On 24/08/2022 23:42, Felipe Polanco wrote: Hello, We are using dnsmasq as DNS server for our public VPN server and today we found a rare issue where DNSMasq filled the entire send buf

Re: [Dnsmasq-discuss] cache.c:1683:30: warning: pointer used after ‘free’

2022-08-15 Thread Simon Kelley
On 14/08/2022 19:36, Geert Stappers via Dnsmasq-discuss wrote: On Fri, Aug 12, 2022 at 06:46:14PM +0100, Simon Kelley wrote: ... Does your compiler still complain? Nope OK. Problem solved. Looks like gcc only generates false positives from free(), not free() called by realloc

Re: [Dnsmasq-discuss] cache.c:1683:30: warning: pointer used after ‘free’

2022-08-12 Thread Simon Kelley
Interesting. I think this is a false positive, as the "use" is pointer arithmetic to derive an integer offset, not a dereference. If you're going to complain about using "buff" like that, you should equally complain of using p, which just the value of buff that's just been freed incremented a f

Re: [Dnsmasq-discuss] [PATCH] Create temporary leases for DHCPOFFER actions

2022-08-12 Thread Simon Kelley
On 08/07/2022 21:26, Petr Menšík wrote: Hi! I have already described similar problem back in year 2021 [1]. There exists race condition when higher count of clients starts at similar time and requests DHCP(v4). First two patches were already sent. I think I have sent also following patches

Re: [Dnsmasq-discuss] [PATCH] Introduce whine_realloc

2022-08-12 Thread Simon Kelley
Patch applied, and a subsequent one to simplify poll.c that it suggested. Simon. On 18/07/2022 16:47, Petr Menšík wrote: Hi, After reading the code creating servers.bind reply, I made a change to use realloc call instead. It should allow saving some memory copying when it is possible to ju

Re: [Dnsmasq-discuss] [PATCH] Fix --server=/#/...... which was lostin 2.86

2022-08-08 Thread Simon Kelley
=dnsmasq.git;a=commit;h=f4b281381853df6b275332d4cd0ec1d150bffa86 Fixes this. Simon. On 08/08/2022 11:27, Simon Kelley wrote: I'm not sure what you are trying to do here. the /#/ domain is only defined in the man page for --address and it states that it matches any domain which doesn't h

Re: [Dnsmasq-discuss] [PATCH] Fix --server=/#/...... which was lostin 2.86

2022-08-08 Thread Simon Kelley
I'm not sure what you are trying to do here. the /#/ domain is only defined in the man page for --address and it states that it matches any domain which doesn't have a more specific match. Even though, server=/#/ is not defined in the documentation; by extension it is exactly the same as se

Re: [Dnsmasq-discuss] [BUG] dynamic-host - Mixing IPv4-only/IPv6-only/IPv4+IPv6 entries breaks reverse DNS

2022-08-01 Thread Simon Kelley
I think this is fixed in the development code: https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=f4c87b504b444efb05892b8c7fc295e886f70789 Simon. On 26/07/2022 16:09, ryt 51V wrote: Hi, I am running into a bug in the following circumstances. When the config has a mix of the below (e

Re: [Dnsmasq-discuss] Synth domain prefix bug in dhcp different from dns.

2022-08-01 Thread Simon Kelley
I wouldn't expect the dnsmasq DHCP server to return these hostnames at all, so something unexpected is happening. Are sure the clients aren't doing a reverse-DNS lookup on their assigned address, or something similar? Setting --log-queries and --log-dhcp and posting the results (or sending th

Re: [Dnsmasq-discuss] [PATCH] RFC8520 (MUD) support in DHCP

2022-07-31 Thread Simon Kelley
rship information to the original author of the respective commit. Cheers, Jasper Am 21.07.22 um 00:06 schrieb Simon Kelley: Jasper, The patch looks fine, and I'm happy to commit it. Geert's point is a good one; please could you supply a suitable commit message which describes c

Re: [Dnsmasq-discuss] With auth-zone enabled, DNS response only provides DHCPv6 IP and ignores IPv4 address/host-record entries

2022-07-23 Thread Simon Kelley
This is a bug, for sure. I can see exactly why this would happen with address=/Computer1.example.org/10.0.0.10 but not with host-record=Computer1.example.org,10.0.0.10,3600 Please could you recheck that you are seeing the problem with --host-record? If you are, I've gone down the wrong track

Re: [Dnsmasq-discuss] dnsmasq AAAA refused when resolving local address if upstream server unavailable

2022-07-23 Thread Simon Kelley
For better or worse, dnsmasq operates by overlaying locally configured data on the global DNS: if the local configuration doesn't include a particular record type, dnsmasq continues to return the data in the global DNS for that record type. That's what's happening here: you've not defined an A

Re: [Dnsmasq-discuss] [PATCH] RFC8520 (MUD) support in DHCP

2022-07-20 Thread Simon Kelley
Jasper, The patch looks fine, and I'm happy to commit it. Geert's point is a good one; please could you supply a suitable commit message which describes clearly what the patch does, and includes this attribution information directly and not as links: the git commit will be around forever, the

Re: [Dnsmasq-discuss] DNSMASQ Cache

2022-06-19 Thread Simon Kelley
tion.c/read_opts": #ifndef NO_ID add_txt("version.bind", "dnsmasq-" VERSION, 0 ); add_txt("authors.bind", "Simon Kelley", 0); . The call to cache_reload calls make_non_terminals:   for (txt = daemon->txt; txt; txt = txt->next)     {

Re: [Dnsmasq-discuss] DNSMASQ Cache

2022-06-19 Thread Simon Kelley
On 13/06/2022 08:16, John Gilmour via Dnsmasq-discuss wrote: Hello, First time user so please bear with me. I have some quite specific in-house code that relies on the "cache->ttd" value.  I have noticed that the function "cache_reload" in "src/cache.c" defines the following variable: stru

Re: [Dnsmasq-discuss] [PATCH] Fix parsing of IPv6 addresses with peer from netlink

2022-05-27 Thread Simon Kelley
The patch looks good to me. Applied. Cheers, Simon. On 19/05/2022 10:43, Beniamino Galvani wrote: On Wed, May 18, 2022 at 04:10:52PM +0200, Geert Stappers via Dnsmasq-discuss wrote: There new lines and one old line + if (rta->rta_type == IFA_LOCAL) +

Re: [Dnsmasq-discuss] [PATCH] Fix DNSSEC handling of CNAME records.

2022-05-26 Thread Simon Kelley
On 21/04/2022 23:46, Chris via Dnsmasq-discuss wrote: From: Chris Staite Fixes the case where a CNAME is valid and unsigned and the target of the CNAME is returned with the CNAME but with no RRSIG (due to the CNAME not being in a signed zone). Since the CNAME is unsigned, there is no additi

Re: [Dnsmasq-discuss] DHCP server not assigning IP to RTMU86

2022-05-20 Thread Simon Kelley
I have a theory: In the logs, it takes between 7 and 9 seconds after carrier detect on eth0 (I guess that's when you plug the RTMU86 in?) before eth0 is allocated IP address 192.168.6.1. Until the address is allocated, dnsmasq will ignore DHCP requests and log "DHCP packet received on eth0

Re: [Dnsmasq-discuss] dnsmasq 2.86 seems to stop reading from one of its dns sockets after a period of time under load

2022-05-16 Thread Simon Kelley
his scenario.  It's a soak test with a large variety of clients all doing busy work like video streaming etc. On Fri, May 13, 2022 at 12:48 PM Simon Kelley <mailto:si...@thekelleys.org.uk>> wrote: On 10/05/2022 16:40, Tom Keddie via Dnsmasq-discuss wrote: >

Re: [Dnsmasq-discuss] DHCP server not responding properly to DHCP-relay from multi-homed host.

2022-05-16 Thread Simon Kelley
On 16/05/2022 17:27, Brad Silva wrote: I ran into an issue with DHCP on DNSmsaq 2.85. It's running on a host with two IP addresses on the same network.  The primary IP is .12 and the secondary is .10.  DNSmasq was put in place to replace a missing server (long story), so it was setup to list

Re: [Dnsmasq-discuss] DHCP server not assigning IP to RTMU86

2022-05-16 Thread Simon Kelley
On 15/05/2022 15:40, Kamil via Dnsmasq-discuss wrote: PS. I've read in FAQ about 255.255.255.255 broadcast and invalid firewall rules, but I don't have any firewall rules and I'm not changing network config files when switching to isc-dhcp-server (which I use as a benchmark) ISC dhcpd b

Re: [Dnsmasq-discuss] dnsmasq 2.86 seems to stop reading from one of its dns sockets after a period of time under load

2022-05-13 Thread Simon Kelley
On 10/05/2022 16:40, Tom Keddie via Dnsmasq-discuss wrote: Hi All, I think you're saying that it's not surprising that dnsmasq is not reading from the socket because the send queue is also full. As per this thread on netdev (https://lore.kernel.org/netdev/cabuuw65r3or9hehsmt_isvx1f-

Re: [Dnsmasq-discuss] dhcp leases file not consulted after restart?

2022-05-13 Thread Simon Kelley
Set the configuration --log-queries. That will allow you to see if the queries are getting to dnsmasq, and it will give you a full dump of the DNS cache (including DHCP derived names) if you send the dnsmasq process SIGUSR1. Both of these will help in diagnosing the problem. Cheers, Simon.

Re: [Dnsmasq-discuss] DHCP server not assigning IP to RTMU86

2022-05-13 Thread Simon Kelley
On 11/05/2022 12:41, Kamil via Dnsmasq-discuss wrote: Hi! I've configured Dnsmasq with the following config: interface=eth0 bind-interfaces dhcp-option=3,192.168.6.1 dhcp-option=6,8.8.8.8 set long-lasting records. dhcp-range=192.168.6.11,192.168.6.20,255.255.255.0,12h

Re: [Dnsmasq-discuss] address option doesn't work correctly if the target domain is a cname

2022-04-18 Thread Simon Kelley
On 16/04/2022 18:13, Анна Тихомирова via Dnsmasq-discuss wrote: Hello. I'm using dnsmasq version 2.86. I've found that address option works incorrectly if the target domain is a cname. Here is an example: 1) Add a domain to dnsmasq configuration: address=/api.ott.kinopoisk.ru/:: 2) Make a

Re: [Dnsmasq-discuss] [dnsmasq] DHCP broadcast option

2022-04-14 Thread Simon Kelley
packet no: 562) is being sent as unicast even though the broadcast tag is enabled in the config file. Please see BOOTP flags. Please let me know your thoughts. Best Regards, Gokularajan G T On Thu, Apr 7, 2022 at 2:10 PM Simon Kelley mailto:si...@thekelleys.org.uk>&

Re: [Dnsmasq-discuss] Extend server to accept hostnames for upstream resolver

2022-04-07 Thread Simon Kelley
This seems like a sensible idea, but it does need a clear warning in the documentation that it will only work if the dnsmasq instance being configured is not the one providing DNS to the local system. Two comments about the patch. 1) Geert's point is a good one: This patch uses only libc: it d

Re: [Dnsmasq-discuss] [dnsmasq] DHCP broadcast option

2022-04-07 Thread Simon Kelley
There's no regression that I'm aware of. It's worth setting the log-dhcp option to see what's going on with tags. Also look at packet dumps. Is the "broadcast" flag set in the OFFER packets? Simon. On 07/04/2022 08:35, Gokularajan G T wrote: Dear Simon, I believe dnsmasq currently supports t

Re: [Dnsmasq-discuss] [PATCH] Heap use after free in dhcp6_no_relay (CVE-2022-0934)

2022-03-31 Thread Simon Kelley
On 31/03/2022 20:04, Petr Menšík wrote: Possible vulnerability were found in latest dnsmasq. It were found with help of oss-fuzz Google project by me and short after that independently also by Richard Johnson of Trellix Threat Labs. It is affected only by DHCPv6 requests, which could be crafte

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-31 Thread Simon Kelley
On 30/03/2022 12:13, Ercolino de Spiacico wrote: It looks like your script which downloads the blocked domains file and compresses it takes 15s, then dnsmasq takes 15s to uncompress the list and load it into memory and sort. The first delay can be solved by doing the download before stoppin

Re: [Dnsmasq-discuss] dnsmasq stable bug report

2022-03-31 Thread Simon Kelley
On 31/03/2022 01:00, dnsm...@riseup.net wrote: The reason it's like this is that if dnsmasq changed to unprivileged action would fail if the port number was less than 1024 Look at the bug report again - its port is above 1024. Without 'query-port=' your software always open way too many por

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-29 Thread Simon Kelley
On 28/03/2022 11:49, Ercolino de Spiacico wrote: This Internet list above (https://hosts.oisd.nl) is 40MB uncompressed, the regex extracts domains-only so shrinking it to 60% of its original size and the gzip compression shrinks much further. Decompressing and scripting it up of course take

Re: [Dnsmasq-discuss] dnsmasq stable bug report

2022-03-28 Thread Simon Kelley
I think I might quibble that this is a bug: there are no promises about the effective userid when a port is opened. The reason it's like this is that if dnsmasq changed to unprivileged user dnsmasq before creating the UDP port, then that action would fail if the port number was less than 1024,

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-27 Thread Simon Kelley
On 27/03/2022 08:52, Ercolino de Spiacico wrote: >> [ -f list.of.domain ] && { create the formatted configuration } >> >> would always fail at dnsmasq level if the list.of.domains doesn't exist >> despite the file existence condition defined. I'm not sure this is meant >> to be and/or i

Re: [Dnsmasq-discuss] Feature request = block-conf

2022-03-26 Thread Simon Kelley
On 24/03/2022 09:28, Ercolino de Spiacico wrote: I've just added it to 2.87test8 Please test and report back. Ok after a first implementation on my test environment this is my feedback: A- Great feature! the scripting + gzip + zcat is a godsend. Yes it pushed the CPU up a bit, yes the t

Re: [Dnsmasq-discuss] dnsmasq --test > output to stderr

2022-03-24 Thread Simon Kelley
On 24/03/2022 09:03, Ercolino de Spiacico wrote: The relevant code looks like:   if (testmode) {    fprintf(stderr, "dnsmasq: %s.\n", _("syntax check OK"));    exit(0); } So it's not an accident, but the reason it's like that is rather lost in the mists of time. Can you t

Re: [Dnsmasq-discuss] dnsmasq --test > output to stderr

2022-03-23 Thread Simon Kelley
On 23/03/2022 21:02, Ercolino de Spiacico wrote: It seems like "dnsmasq --test" redirects the output "syntax check OK" message to stderr (2) by default: root@sparrow:/tmp# dnsmasq --test dnsmasq: syntax check OK. root@sparrow:/tmp# dnsmasq --test 1>/dev/null dnsmasq: syntax check OK. root@s

Re: [Dnsmasq-discuss] --server order / default if fail

2022-03-22 Thread Simon Kelley
On 22/03/2022 07:51, renmingshuai via Dnsmasq-discuss wrote: For the firest question, if more than one one entry, not in strict-order, dnsmasq will forward the query to all nameservers according to matching rules which are set by these entries. Sort-of. It may send it to only one, if that is

Re: [Dnsmasq-discuss] /etc/resolv.conf polling limitation

2022-03-22 Thread Simon Kelley
On 22/03/2022 01:42, Preston Crow wrote: I just ran into an interesting issue: In my config, I set: resolv-file=/etc/resolv.conf.upstream If I edit that file, I instantly see dnsmasq reload things as expected with various log messages.  That's good. However, in my case, /etc/resolv.conf.up

Re: [Dnsmasq-discuss] [patch] Add new option --bind-mac-with-ipv6 to rebind the same ipv6 address when the duid of the client changed

2022-03-21 Thread Simon Kelley
This is another take on a recurring problem. There is a facility to work around it by allowing multiple addresses to be specified in dhcp-host. That works for the specific case of chain-netbooting, where the host's DUID changes at each stage of the boot. I appreciate that may not be the problem

Re: [Dnsmasq-discuss] dnsmasq consuming more memory

2022-03-14 Thread Simon Kelley
pretty old, I'd like you to test a more recent version before putting effort into chasing this. Cheers, Simon. On 11/03/2022 10:20, shashikumar Shashi wrote: Hi Simon Kelley, dnsmasq is running continuously for around five months, we had around 150 clients. After 5 months dnsmasq got k

Re: [Dnsmasq-discuss] Does dnsmasq support cname within same domain?

2022-03-07 Thread Simon Kelley
On 07/03/2022 22:06, Geoff Back wrote: On 07/03/2022 18:20, Simon Kelley wrote: A quick test of the current development code fails to reproduce this, which is puzzling. One thing to check: having a dhcp-host line which associates an address with a name is not enough to make this work

Re: [Dnsmasq-discuss] Does dnsmasq support cname within same domain?

2022-03-07 Thread Simon Kelley
On 07/03/2022 20:51, Frank Liu wrote: On Mon, Mar 7, 2022 at 10:46 AM Simon Kelley wrote: A quick test of the current development code fails to reproduce this, which is puzzling. One thing to check: having a dhcp-host line which associates an address with a name is not enough to make

Re: [Dnsmasq-discuss] Does dnsmasq support cname within same domain?

2022-03-07 Thread Simon Kelley
A quick test of the current development code fails to reproduce this, which is puzzling. One thing to check: having a dhcp-host line which associates an address with a name is not enough to make this work: there needs to be an active DHCP lease in place to be able to resolve client1.test.exa

Re: [Dnsmasq-discuss] DNS Upstream routing

2022-03-07 Thread Simon Kelley
You can set the source address of upstream queries in the --server option, which can work in some circumstances (and can ensure that the replies also come back via the VPN, which isn't a given. In general, this is a routing question: you need to route traffic to 1.1.1.1 via the VPN and do sui

Re: [Dnsmasq-discuss] SEGV on dnsmasq 2.81

2022-03-07 Thread Simon Kelley
    > > Dnsmasq logs: >     > > Is it a known failure/bug? > Could you please help? We, being projectlead Simon Kelley and us, released newer versions of Dnsmasq. Please try to reproduce the crash with a recent version. Section "

<    1   2   3   4   5   6   7   8   9   10   >