[Dnsmasq-discuss] interface-name potential bug

Ondrej Pirko ondrej.pirko at ui.com
Fri May 31 13:29:16 UTC 2024


I am using dnsmasq 2.90 for captive portal besides other use cases and 
I've noticed that when I put into dnsmasq cfg file e.g. 
`interface-name=captive.apple.com,switch0.1` (this interface contains 
ipv6 LL address and `100.104.103.1/28`) I will be getting this on the 
client device (dnsmasq is running on a router which serves as a gateway 
for the client to the internet):

|$ host captive.apple.com captive.apple.com has address 100.104.103.1 
captive.apple.com is an alias for 
captive-cidr.origin-apple.com.akadns.net. 
captive-cidr.origin-apple.com.akadns.net is an alias for 
captive-cdn.origin-apple.com.akadns.net. 
captive-cdn.origin-apple.com.akadns.net is an alias for 
captive.g.aaplimg.com. captive.g.aaplimg.com has IPv6 address 
2a01:b740:a10:f000::199 captive.g.aaplimg.com has IPv6 address 
2a01:b740:a10:f100::210 captive.apple.com is an alias for 
captive-cidr.origin-apple.com.akadns.net. 
captive-cidr.origin-apple.com.akadns.net is an alias for 
captive-cdn.origin-apple.com.akadns.net. 
captive-cdn.origin-apple.com.akadns.net is an alias for 
captive.g.aaplimg.com. $ host captive.apple.com captive.apple.com is an 
alias for captive-cidr.origin-apple.com.akadns.net. 
captive-cidr.origin-apple.com.akadns.net is an alias for 
captive-cdn.origin-apple.com.akadns.net. 
captive-cdn.origin-apple.com.akadns.net is an alias for 
captive.g.aaplimg.com. captive.g.aaplimg.com has address 17.253.73.203 
captive.g.aaplimg.com has address 17.253.73.201 captive.g.aaplimg.com 
has IPv6 address 2a01:b740:a10:f000::199 captive.g.aaplimg.com has IPv6 
address 2a01:b740:a10:f100::210|

Note that on the first run the ipv4 address from the interface is 
correctly retrieved, however on the second run it appears that the IP 
for an alias is not retrieved, but the address for A record to which the 
alias resolves is actually retrieved - and that's the real IP address. 
This then breaks the resolution to my captive portal.

Whereas If I use `host-record=captive.apple.com,100.104.103.1` instead, 
the IP address retrieved is deterministic and is indeed `100.104.103.1`. 
So this seems to be working as I'd expect, however it has the downside 
that I have to specify the IP address manually.

Is this expected behaviour or is this a bug? I tried looking through the 
documentation and even `dnsmasq`code briefly, but I unfortunately 
couldn't determine that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20240531/db23ea25/attachment.htm>


More information about the Dnsmasq-discuss mailing list