resolver: incorrect TTL used with A+CNAME response
|Reported by:||Sergey Kandaurov||Owned by:|
By default, nginx caches responses using the TTL value of a response.
The resolver doesn't fully operate correctly on multiple entries
received together in one DNS response.
For example, when the received answer contains multiple records as follows:
upstream 60 CNAME cname1
cname1 86400 A 10.10.10.10
Here the CNAME resolution stage would be "skipped", and the resolver cache
will store for "upstream" a finally resolved address with TTL 86400.