diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-07-28 18:38:54 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-07-28 18:38:54 +0200 |
commit | 1086182d83d4c02a75f96f0184d5e8e5d3af6528 (patch) | |
tree | 16f3ad53eeebf8da3a6e48251f75f29103bf2fd8 /src/resolve/resolved-dns-transaction.c | |
parent | 87b46c575a14c133fbc408b56b0835f13a918b1d (diff) |
resolved: compare dns question arrays properly
Let's optimize things a bit and properly compare DNS question arrays,
instead of checking if they are mutual supersets. This also makes ANY
query handling more accurate.
Diffstat (limited to 'src/resolve/resolved-dns-transaction.c')
-rw-r--r-- | src/resolve/resolved-dns-transaction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index b235fda3d2..8a93b265c6 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -406,8 +406,8 @@ void dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p) { } /* Only consider responses with equivalent query section to the request */ - if (!dns_question_is_superset(p->question, t->question) || - !dns_question_is_superset(t->question, p->question)) { + r = dns_question_is_equal(p->question, t->question); + if (r <= 0) { dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY); return; } |