mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-29 12:14:28 +00:00
fixed bug #48398 (dns: entries reused during found-callback could be aborted if ttl==0)
This commit is contained in:
parent
2e26fc9224
commit
2fdea8b79b
@ -1073,10 +1073,13 @@ dns_correct_response(u8_t idx, u32_t ttl)
|
|||||||
|
|
||||||
if (entry->ttl == 0) {
|
if (entry->ttl == 0) {
|
||||||
/* RFC 883, page 29: "Zero values are
|
/* RFC 883, page 29: "Zero values are
|
||||||
interpreted to mean that the RR can only be used for the
|
interpreted to mean that the RR can only be used for the
|
||||||
transaction in progress, and should not be cached."
|
transaction in progress, and should not be cached."
|
||||||
-> flush this entry now */
|
-> flush this entry now */
|
||||||
entry->state = DNS_STATE_UNUSED;
|
/* entry reused during callback? */
|
||||||
|
if (entry->state == DNS_STATE_DONE) {
|
||||||
|
entry->state = DNS_STATE_UNUSED;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user