clean up dns_parse_callback
authorRich Felker <dalias@aerifal.cx>
Wed, 19 Oct 2022 18:02:48 +0000 (14:02 -0400)
committerRich Felker <dalias@aerifal.cx>
Wed, 19 Oct 2022 18:02:48 +0000 (14:02 -0400)
commit63402be229facae2d0de9c5943a6ed25246fd021
tree217f28e942d5ed28add09710cf07a9a4b440543e
parent0a7b4323b0f2b944dbd47a813c0c6e6813e7fd67
clean up dns_parse_callback

the only functional change here should be that MAXADDRS is only
checked for RRs that provide address results, so that a CNAME which
appears after an excessive number of address RRs does not get ignored.
I'm not aware of any servers that order the RRs this way, and it may
even be forbidden to do so, but I prefer having the callback logic not
be order dependent.

other than that, the motivation for this change is that the A and AAAA
cases were mostly duplicate code that could be combined as a single
code path.
src/network/lookup_name.c