]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: resolvers: No longer store query items in a list into the response
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Dec 2021 14:07:26 +0000 (15:07 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 1 Dec 2021 14:21:56 +0000 (15:21 +0100)
commitc1699f8c1b5a91b7aa59354b3f807531d36d10ee
tree0f8f37c4c3a62e2972cf5a2ea42ea97d3027a856
parent80b2e34b18b805d28a9569d8157c7bcf088eef8f
MEDIUM: resolvers: No longer store query items in a list into the response

When the response is parsed, query items are stored in a list, attached to
the parsed response (resolve_response).

First, there is one and only one query sent at a time. Thus, there is no
reason to use a list. There is a test to be sure there is only one query
item in the response. Then, the reference on this query item is only used to
validate the domain name is the one requested. So the query list can be
removed. We only expect one query item, no reason to loop on query records.
In addition, the query domain name is now immediately checked against the
resolution domain name. This way, the query item is only manipulated during
the response parsing.
include/haproxy/resolvers-t.h
src/resolvers.c