[Dnsmasq-discuss] Dnsmasq doesn't reply to queries made over (link-local) IPv6

Simon Kelley simon at thekelleys.org.uk
Sat Sep 3 22:28:41 BST 2016


OK, naive attempts to reproduce this have failed entirely, it just works
for me :-)

Can you run dnsmasq under strace -e trace=network and see what syscalls
it makes, specifically, if it's calling sendmsg() with the reply?

This is what I see, not that sin6_scope_id is correct in both calls.

recvmsg(6, {msg_name(28)={sa_family=AF_INET6, sin6_port=htons(40524),
inet_pton(AF_INET6, "fe80::224:d6ff:feb0:75a2", &sin6_addr),
sin6_flowinfo=0, sin6_scope_id=if_nametoindex("wlan0")},
msg_iov(1)=[{"?9\1
\0\1\0\0\0\0\0\1\3mit\3edu\0\0\1\0\1\0\0)\20\0\0\0"..., 4096}],
msg_controllen=40, {cmsg_len=36, cmsg_level=SOL_IPV6, cmsg_type=, ...},
msg_flags=0}, 0) = 36
dnsmasq: query[A] mit.edu from fe80::224:d6ff:feb0:75a2
dnsmasq: cached mit.edu is 104.64.165.212
sendmsg(6, {msg_name(28)={sa_family=AF_INET6, sin6_port=htons(40524),
inet_pton(AF_INET6, "fe80::224:d6ff:feb0:75a2", &sin6_addr),
sin6_flowinfo=0, sin6_scope_id=if_nametoindex("wlan0")},
msg_iov(1)=[{"?9\201\200\0\1\0\1\0\0\0\1\3mit\3edu\0\0\1\0\1\300\f\0\1\0\1\0"...,
52}], msg_controllen=36, {cmsg_len=36, cmsg_level=SOL_IPV6, cmsg_type=,
...}, msg_flags=0}, 0) = 52


Cheers,

Simon.


On 02/09/16 10:14, Toke Høiland-Jørgensen wrote:
> Simon Kelley <simon at thekelleys.org.uk> writes:
> 
>> My first thought is that it's probably replying to the wrong
>> interface: link local addresses can't be routed: you have to specify
>> the interface they're connected to. This insight came late to me, and
>> there's a chance that the dnsmasq code is still messing it up. I'll
>> take a closer look in the next day or two.
> 
> Awesome, thanks! :)
> 
> -Toke
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20160903/1cc41dc1/attachment.sig>


More information about the Dnsmasq-discuss mailing list