]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: allow dns_cache_put() without a question 1030/head
authorDaniel Mack <daniel@zonque.org>
Tue, 4 Aug 2015 11:53:02 +0000 (13:53 +0200)
committerDaniel Mack <daniel@zonque.org>
Tue, 25 Aug 2015 12:26:18 +0000 (14:26 +0200)
commiteff91ee0070f85432e4926403b58ed10cbea1af5
treefcb3a26d88e26f93c640b5a76abb7904b42ef430
parenta7e5da6e33de9ad9b5bc594fdc74e3e4098a5751
resolved: allow dns_cache_put() without a question

Currently, dns_cache_put() does a number of things:

1) It unconditionally removes all keys contained in the passed
   question before adding keys from the newly arrived answers.

2) It puts positive entries into the cache for all RRs contained
   in the answer.

3) It creates negative entries in the cache for all keys in the
   question that are not answered.

Allow passing q = NULL in the parameters and skip 1) and 3), so
we can use that function for mDNS responses. In this case, the
question is irrelevant, we are interested in all answers we got.
src/resolve/resolved-dns-cache.c