resolved: cache - don't flush the cache of mDNS records unneccesarily
authorTom Gundersen <teg@jklm.no>
Thu, 10 Dec 2015 18:57:41 +0000 (19:57 +0100)
committerTom Gundersen <teg@jklm.no>
Thu, 10 Dec 2015 19:15:58 +0000 (20:15 +0100)
commit02c2857b8d9bb61305c9857161c85ada801b8cb8
treeb8dd4856dc9d489d4e538590dd56f34df29373c3
parent2250592422ad1c2a9ac3894823caab0e61363398
resolved: cache - don't flush the cache of mDNS records unneccesarily

When the DNS_RESOURCE_KEY_CACHE_FLUSH flag is not set for an mDNS packet, we should not flush
the cache for RRs with matching keys. However, we were unconditionally flushing the cache
also for these packets.

Now mark all packets as cache_flush by default, except for these mDNS packets, and respect
that flag in the cache handling.

This fixes 90325e8c2e559a21ef0bc2f26b844c140faf8020.
src/resolve/resolved-dns-cache.c
src/resolve/resolved-dns-packet.c