]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: action: do-resolve now use cached response
authorBaptiste Assmann <bedis9@gmail.com>
Wed, 30 Oct 2019 15:06:53 +0000 (16:06 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 7 Nov 2019 17:46:55 +0000 (18:46 +0100)
commit7264dfe9495a7bfd784b8964508e4204b7e077af
tree1e74ce9c08c44b6b0d90d497216fbdaaad024092
parentfee726ffa7f44eab408bd2cd63bf15c7dc8a94f5
BUG/MINOR: action: do-resolve now use cached response

As reported by David Birdsong on the ML, the HTTP action do-resolve does
not use the DNS cache.
Actually, the action is "registred" to the resolution for said name to
be resolved and wait until an other requester triggers the it. Once the
resolution is finished, then the action is updated with the result.
To trigger this, you must have a server with runtime DNS resolution
enabled and run a do-resolve action with the same fqdn AND they use the
same resolvers section.

This patch fixes this behavior by ensuring the resolution associated to
the action has a valid answer which is not considered as expired. If
those conditions are valid, then we can use it (it's the "cache").

Backport status: 2.0
src/dns.c