diff options
author | Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> | 2016-12-02 15:28:14 +0200 |
---|---|---|
committer | Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> | 2017-01-19 11:51:21 +0200 |
commit | 58ab31d57fdc2b55ebe07be90aea492911b6bad5 (patch) | |
tree | 30c7b4985fd46836246fc6f476e62c0d534f0fb5 /src/resolve/resolved-dns-scope.c | |
parent | 53fda2bb933694c9bdb1bbf1f5583e39673b74b2 (diff) |
resolved: add cache-flush bit to answers in mDNS announcements
See the section 10.2 of RFC6762 for details.
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Diffstat (limited to 'src/resolve/resolved-dns-scope.c')
-rw-r--r-- | src/resolve/resolved-dns-scope.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index 6616bc4e0e..b47cb79795 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -847,11 +847,11 @@ static int dns_scope_make_conflict_packet( DNS_PACKET_HEADER(p)->qdcount = htobe16(1); DNS_PACKET_HEADER(p)->arcount = htobe16(1); - r = dns_packet_append_key(p, rr->key, NULL); + r = dns_packet_append_key(p, rr->key, 0, NULL); if (r < 0) return r; - r = dns_packet_append_rr(p, rr, NULL, NULL); + r = dns_packet_append_rr(p, rr, 0, NULL, NULL); if (r < 0) return r; @@ -1086,12 +1086,12 @@ void dns_scope_announce(DnsScope *scope) { answer = dns_answer_new(4); LIST_FOREACH(addresses, a, scope->link->addresses) { - r = dns_answer_add(answer, a->mdns_address_rr, 0); + r = dns_answer_add(answer, a->mdns_address_rr, 0, DNS_ANSWER_CACHE_FLUSH); if (r < 0) { log_debug_errno(r, "Failed to add address RR to answer: %m"); return; } - r = dns_answer_add(answer, a->mdns_ptr_rr, 0); + r = dns_answer_add(answer, a->mdns_ptr_rr, 0, DNS_ANSWER_CACHE_FLUSH); if (r < 0) { log_debug_errno(r, "Failed to add PTR RR to answer: %m"); return; |