policy forward does not skip dead servers
The kresd
always tries to contact servers in order specified in configuration and does not preffer the working one:
This happens e.g. in situation where configuration specifies two forwarders in following order:
- dead address
192.0.2.111
- working address
192.168.3.1
Here is log from attempts to resolve various non-cached names:
[plan] plan 'nonexistent.' type 'NS'
[resl] => querying: '192.0.2.111' score: 1425 zone cut: '.' m12n: 'nonexiSteNT.' type: 'NS' proto: 'udp'
[resl] => querying: '192.168.3.1' score: 1425 zone cut: '.' m12n: 'nonexiSteNT.' type: 'NS' proto: 'udp'
[iter] <= rcode: NXDOMAIN
[ pc ] => answer cached for TTL=900
[resl] <= server: '192.0.2.111' rtt: >=270 ms
[resl] <= server: '192.168.3.1' rtt: 20 ms
[resl] finished: 4, queries: 1, mempool: 16400 B
[plan] plan 'sorry-root.' type 'NS'
[resl] => querying: '192.0.2.111' score: 20 zone cut: '.' m12n: 'SoRrY-roOt.' type: 'NS' proto: 'udp'
[resl] => querying: '192.168.3.1' score: 20 zone cut: '.' m12n: 'SoRrY-roOt.' type: 'NS' proto: 'udp'
[iter] <= rcode: NXDOMAIN
[ pc ] => answer cached for TTL=900
[resl] <= server: '192.0.2.111' rtt: >=172 ms
[resl] finished: 4, queries: 1, mempool: 16400 B
[plan] plan 'qqq.' type 'NS'
[resl] => querying: '192.0.2.111' score: 20 zone cut: '.' m12n: 'QqQ.' type: 'NS' proto: 'udp'
[resl] => querying: '192.168.3.1' score: 20 zone cut: '.' m12n: 'QqQ.' type: 'NS' proto: 'udp'
[iter] <= rcode: NXDOMAIN
[ pc ] => answer cached for TTL=900
[resl] <= server: '192.0.2.111' rtt: >=49 ms
[resl] finished: 4, queries: 1, mempool: 16400 B