[Dnsmasq-discuss] --server order / default if fail
Simon Kelley
simon at thekelleys.org.uk
Tue Mar 22 14:36:45 UTC 2022
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 answering queries
promptly. If that fails, all will be tried. (Note that this is only true
for release 2.85, older releases behave differently).
>
> For the second question, when dnsmasq start with
> –server=/xpto.biz/192.168.1.1 at tun0
> <mailto:–server=/xpto.biz/192.168.1.1 at tun0>, dnsmasq will call
> setsockopt() in local_bind() and try to bind socket with device. if bind
> not success, dnsmasq will drop this query.
Yes. The error is logged.
Simon.
>
> gdb info
>
> #0 local_bind (fd=fd at entry=12, addr=addr at entry=0xaaaaaab143ac,
> intname=intname at entry=0xaaaaaab143c8 "tuno", ifindex=0,
> is_tcp=is_tcp at entry=0) at network.c:1235
>
> #1 0x0000aaaaaaabf7fc in random_sock (s=s at entry=0xaaaaaab14390) at
> forward.c:2185
>
> #2 0x0000aaaaaaac12a0 in allocate_rfd (fdlp=0xaaaaaab1c160,
> serv=0xaaaaaab14390) at forward.c:2290
>
> #3 0x0000aaaaaaac1b50 in forward_query (udpfd=0,
> udpaddr=udpaddr at entry=0xfffffffff068, dst_addr=0xaaaaaaac71dc
> <check_dns_listeners+924>,
>
> dst_addr at entry=0xfffffffff0c8, dst_iface=65535, dst_iface at entry=2,
> header=header at entry=0xaaaaaab154a0, plen=63, plen at entry=0,
> now=now at entry=1647934955,
>
> forward=<optimized out>, forward at entry=0x0, ad_reqd=<optimized
> out>, ad_reqd at entry=1, do_bit=<optimized out>, do_bit at entry=-1431225600)
> at forward.c:511
>
> #4 0x0000aaaaaaac2868 in receive_query (listen=0xaaaaaab14980,
> now=1647934955) at forward.c:1583
>
> #5 0x0000aaaaaaac71dc in check_dns_listeners (now=1647934955) at
> dnsmasq.c:1786
>
> #6 0x0000aaaaaaaac074 in main (argc=<optimized out>, argv=<optimized
> out>) at dnsmasq.c:1207
>
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss
More information about the Dnsmasq-discuss
mailing list