]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: dns: Don't store additional records in a linked-list
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Sep 2020 08:06:01 +0000 (10:06 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 8 Sep 2020 08:44:39 +0000 (10:44 +0200)
commit5a89175ac86623e57dfa9688663ca52b2fee9ffb
tree27d9badb0185f3e81648aba0311eb53e5bd9cd71
parentc14d20eda38e48ff3db588e9dad34f56967f72e6
BUG/MEDIUM: dns: Don't store additional records in a linked-list

A SRV record keeps a reference on the corresponding additional record, if
any. But this additional record is also inserted in a separate linked-list into
the dns response. The problems arise when obsolete additional records are
released. The additional records list is purged but the SRV records always
reference these objects, leading to an undefined behavior. Worst, this happens
very quickly because additional records are never renewed. Thus, once received,
an additional record will always expire.

Now, the addtional record are only associated to a SRV record or simply
ignored. And the last version is always used.

This patch helps to fix the issue #841. It must be backported to 2.2.
include/haproxy/dns-t.h
src/dns.c