fixed bug #48398 (dns: entries reused during found-callback could be aborted if ttl==0)

This commit is contained in:
goldsimon 2016-07-04 13:55:20 +02:00
parent 2e26fc9224
commit 2fdea8b79b

View File

@ -1073,10 +1073,13 @@ dns_correct_response(u8_t idx, u32_t ttl)
if (entry->ttl == 0) {
/* RFC 883, page 29: "Zero values are
interpreted to mean that the RR can only be used for the
transaction in progress, and should not be cached."
-> flush this entry now */
entry->state = DNS_STATE_UNUSED;
interpreted to mean that the RR can only be used for the
transaction in progress, and should not be cached."
-> flush this entry now */
/* entry reused during callback? */
if (entry->state == DNS_STATE_DONE) {
entry->state = DNS_STATE_UNUSED;
}
}
}
/**