summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-bus.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-03-24 18:36:41 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-03-25 11:37:30 +0100
commit8640566ac41447e07bb8b4e990626a17b183c80c (patch)
tree6ca32f5de1f43cb526fc631d7ed7630ed0b8d271 /src/resolve/resolved-bus.c
parent9b564bbca5fcfb251b7990c8642c82846d09338b (diff)
downloadsystemd-8640566ac41447e07bb8b4e990626a17b183c80c.tar.gz
resolved: pass mDNS reply packets to each transaction exactly once
Previously we'd iterate through the RRs of an mDNS reply and then find exactly one matching transaction on our scope for it, and pass it as reply to that. If multiple RRs of the same packet match we'd pas the packet multiple times to the transaction even. This all doesn't really work anymore since there can be multiple open transactions for the same key (with different flags), and it's kinda ugly anywy. Hence let's turn this around: let's iterate through the transactions and check if any of the included RRs match it, and if so pass the packet to that transaction exactly once. This speeds up mDNS a bit, since previously we'd oftentimes fail to find all suitable transactions for an mDNS reply (because there can be multiple transactions for the same RR key with different flags, and we checked exactly one flag combination). Which would then mean the transaction would time out, and be retried – at which point the cache would be populated and thus it would still succeed, but only after this timeout. With this fix this is corrected: every transaction that matches will get the reply, instantly as we get it.
Diffstat (limited to 'src/resolve/resolved-bus.c')
0 files changed, 0 insertions, 0 deletions