diff options
author | Tom Gundersen <teg@jklm.no> | 2015-07-19 21:42:52 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-07-23 18:06:50 +0200 |
commit | 6709eb94f9eae15f0b4ce87ad98de05b4182a30a (patch) | |
tree | 8a2c4fed8f054f420964c2ba573a2bacf5b102a3 /src | |
parent | 0e03ade57ea327cdefc34aaeb0a47c985b238120 (diff) |
resolve: transaction - stop processing packet when found to be invalid
We were stopping the transaction, but we need to stop processing the packet alltogether.
Diffstat (limited to 'src')
-rw-r--r-- | src/resolve/resolved-dns-transaction.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-transaction.c b/src/resolve/resolved-dns-transaction.c index e468f245f7..3d46c99df8 100644 --- a/src/resolve/resolved-dns-transaction.c +++ b/src/resolve/resolved-dns-transaction.c @@ -417,8 +417,10 @@ 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)) + !dns_question_is_superset(t->question, p->question)) { dns_transaction_complete(t, DNS_TRANSACTION_INVALID_REPLY); + return; + } /* According to RFC 4795, section 2.9. only the RRs from the answer section shall be cached */ dns_cache_put(&t->scope->cache, p->question, DNS_PACKET_RCODE(p), p->answer, DNS_PACKET_ANCOUNT(p), 0, p->family, &p->sender); |