Skip to content

Commit f06bf53

Browse files
committed
async-dns: don't always drop apparant dupes
1 parent 0b76801 commit f06bf53

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/system/async-dns/async-dns-parse.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,14 @@ lws_adns_parse_udp(lws_async_dns_t *dns, const uint8_t *pkt, size_t len)
588588
return;
589589
}
590590

591-
/* we can get dups... drop any that have already happened */
591+
/*
592+
* we may have recursed and the packet we just got started earlier than
593+
* the current TID we are working with... if so, ignore it
594+
*/
595+
596+
if ((lws_ser_ru16be(pkt + DHO_TID) & 0xfffe) !=
597+
(LADNS_MOST_RECENT_TID(q) & 0xfffe))
598+
return;
592599

593600
n = 1 << (lws_ser_ru16be(pkt + DHO_TID) & 1);
594601
if (q->responded & n) {

0 commit comments

Comments
 (0)