[Dnsmasq-discuss] [BUG] permutation depends on order of entries in /etc/hosts
Christian König
ckoenig at posteo.de
Fri Apr 22 11:54:01 UTC 2022
Hi all,
I think I came across a bug. Depending of the order of entries in
/etc/hosts the permutation of answers for queries with more then one
entry might not happen. According to [1], permutation is the desired
behavior. Tested with dnsmasq 2.87test8.
Minimal example:
/etc/hosts with
```
10.0.2.1 gateway.lan
10.0.2.2 gateway.lan
10.0.2.1 son.lan
```
does permutate the answers to repeated queries by `dig gateway.lan`
___
However, if the order in /etc/hosts is
```
10.0.2.1 son.lan
10.0.2.1 gateway.lan
10.0.2.2 gateway.lan
```
the answers are not permutated.
Best,
Christian
_____
[1] https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2008q1/001774.html
More information about the Dnsmasq-discuss
mailing list