mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-27 20:11:12 -05:00
Synchronze udp_ready() and tcp_connected() functions entry behavior
The `udp_ready()` and `tcp_connected()` functions in dighost.c are
used for similar purposes for UDP and TCP respectively.
Synchronize the `udp_ready()` function entry code to behave like
`tcp_connected()` by adding input validation, debug messages and
early exit code when `cancel_now` is `true`.
(cherry picked from commit 4477f71868)
This commit is contained in:
parent
09e9aabb11
commit
cfdf95d437
1 changed files with 14 additions and 0 deletions
|
|
@ -2918,8 +2918,22 @@ udp_ready(isc_nmhandle_t *handle, isc_result_t eresult, void *arg) {
|
|||
dig_query_t *readquery = NULL;
|
||||
int local_timeout = timeout * 1000;
|
||||
|
||||
REQUIRE(DIG_VALID_QUERY(query));
|
||||
REQUIRE(query->handle == NULL);
|
||||
|
||||
debug("udp_ready()");
|
||||
|
||||
query->started = true;
|
||||
|
||||
if (atomic_load(&cancel_now)) {
|
||||
return;
|
||||
}
|
||||
|
||||
INSIST(!free_now);
|
||||
|
||||
debug("udp_ready(%p, %s, %p)", handle, isc_result_totext(eresult),
|
||||
query);
|
||||
|
||||
if (eresult == ISC_R_CANCELED || query->canceled) {
|
||||
dig_lookup_t *l = query->lookup;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue