resolve/mdns: do not append goodby packet entries to known answers section
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 2 Jan 2024 19:36:47 +0000 (04:36 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Wed, 3 Jan 2024 12:16:43 +0000 (13:16 +0100)
commit04d4086c228afc907fc1b70fcef892d651f7c0cc
tree04bfdc56ae8a9c88710bd9204a2c0f381d7da97c
parent7c2e495c75fc9fadfb342e6e39ff40bb40eaeadd
resolve/mdns: do not append goodby packet entries to known answers section

When we receive a goodby packet about a host, and we have a cache entry about
the host, we do not immediately remove the cache entry, but update it with TTL 1.
See RFC 6762 section 10.1 and 3755027c2cada70345c96787a9b5569994dd23ed.

If we receive a request soon after the goodby packet, previously the
entry was included in the known answers section of the reply. But such
information should not be appended.

Follow-up for 3755027c2cada70345c96787a9b5569994dd23ed.
src/resolve/resolved-dns-cache.c