dig +nssearch failure handling robustness issues
DiG +nssearch
mode is special, because the queries in the followup lookup are independent and they are being started in parallel by a chain: starting from the second query, each query starts in the send_done()
callback of the previous query.
The !6343 (merged) MR fixed a crash by implementing special logic in recv_done()
when dealing with failed queries in +nssearch mode, but more special logic needs to be implemented also in tcp_connected()
, udp_ready()
, send_done()
, and possibly elsewhere.
For example, if send_done()
callback gets called with a failure result, we should still make sure to start the next query (see the first paragraph) so that chain of queries can complete instead of halting it abruptly in the middle just because send()
returned an error code for a single NS server.