summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-transaction.h
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-08-25 17:57:58 +0200
committerDaniel Mack <daniel@zonque.org>2015-12-08 16:51:40 +0100
commitef7ce6df4d5084bb0cba78e71a2bb932b59045e8 (patch)
treefd3958bf27bbb7f2ff01adffcd427afe255b2b9f /src/resolve/resolved-dns-transaction.h
parent90325e8c2e559a21ef0bc2f26b844c140faf8020 (diff)
resolved: short-cut jitter callbacks for LLMNR and mDNS
When a jitter callback is issued instead of sending a DNS packet directly, on_transaction_timeout() is invoked to 'retry' the transaction. However, this function has side effects. For once, it increases the packet loss counter on the scope, and it also unrefs/refs the server instances. Fix this by tracking the jitter with two bool variables. One saying that the initial jitter has been scheduled in the first place, and one that tells us the delay packet has been sent.
Diffstat (limited to 'src/resolve/resolved-dns-transaction.h')
-rw-r--r--src/resolve/resolved-dns-transaction.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-transaction.h b/src/resolve/resolved-dns-transaction.h
index 1d445ffee7..e3d4b861be 100644
--- a/src/resolve/resolved-dns-transaction.h
+++ b/src/resolve/resolved-dns-transaction.h
@@ -62,7 +62,8 @@ struct DnsTransaction {
DnsTransactionState state;
uint16_t id;
- bool initial_jitter;
+ bool initial_jitter_scheduled;
+ bool initial_jitter_elapsed;
DnsPacket *sent, *received;