resolved: handle mDNS timeouts per transaction
mDNS packet timeouts need to be handled per transaction, not per link. Re-use the n_attempts field for this purpose, as packets timeouts should be determined by starting at 1 second, and doubling the value on each try.
This commit is contained in:
parent
ef7ce6df4d
commit
11a27c2ec1
|
@ -656,8 +656,10 @@ static usec_t transaction_get_resend_timeout(DnsTransaction *t) {
|
||||||
assert(t->server);
|
assert(t->server);
|
||||||
|
|
||||||
return t->server->resend_timeout;
|
return t->server->resend_timeout;
|
||||||
case DNS_PROTOCOL_LLMNR:
|
|
||||||
case DNS_PROTOCOL_MDNS:
|
case DNS_PROTOCOL_MDNS:
|
||||||
|
assert(t->n_attempts > 0);
|
||||||
|
return (1 << (t->n_attempts - 1)) * USEC_PER_SEC;
|
||||||
|
case DNS_PROTOCOL_LLMNR:
|
||||||
return t->scope->resend_timeout;
|
return t->scope->resend_timeout;
|
||||||
default:
|
default:
|
||||||
assert_not_reached("Invalid DNS protocol.");
|
assert_not_reached("Invalid DNS protocol.");
|
||||||
|
|
Loading…
Reference in New Issue