|author||Rich Felker <email@example.com>||2022-06-03 11:03:00 -0400|
|committer||Rich Felker <firstname.lastname@example.org>||2022-06-03 11:03:00 -0400|
ensure distinct query id for parallel A and AAAA queries in resolver
assuming a reasonable realtime clock, res_mkquery is highly unlikely to generate the same query id twice in a row, but it's possible with a very low-resolution system clock or under extreme delay of forward progress. when it happens, res_msend fails to wait for both answers, and instead stops listening after getting two answers to the same query (A or AAAA). to avoid this, increment one byte of the second query's id if it matches the first query's. don't bother checking if the second byte is also equal, since it doesn't matter; we just need to ensure that at least one byte is distinct.
Diffstat (limited to 'arch/generic/bits/dirent.h')
0 files changed, 0 insertions, 0 deletions