Commit 7f305407 authored by Mark Andrews's avatar Mark Andrews Committed by Ondřej Surý
Browse files

prevent TSAN being trigged when DNS_RBTFIND_EMPTYDATA is set

parent 9b5969ea
Pipeline #22003 passed with stages
in 25 minutes and 5 seconds
......@@ -1652,9 +1652,11 @@ dns_rbt_findnode(dns_rbt_t *rbt, const dns_name_t *name, dns_name_t *foundname,
/*
* This might be the closest enclosing name.
*/
if (DATA(current) != NULL ||
(options & DNS_RBTFIND_EMPTYDATA) != 0)
if ((options & DNS_RBTFIND_EMPTYDATA) != 0 ||
DATA(current) != NULL)
{
*node = current;
}
/*
* Point the chain to the next level. This
......@@ -1725,8 +1727,8 @@ dns_rbt_findnode(dns_rbt_t *rbt, const dns_name_t *name, dns_name_t *foundname,
* ISC_R_SUCCESS to indicate an exact match.
*/
if (current != NULL && (options & DNS_RBTFIND_NOEXACT) == 0 &&
(DATA(current) != NULL ||
(options & DNS_RBTFIND_EMPTYDATA) != 0)) {
((options & DNS_RBTFIND_EMPTYDATA) != 0 || DATA(current) != NULL))
{
/*
* Found an exact match.
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment