resolved: cache - handle CNAME redirection
authorTom Gundersen <teg@jklm.no>
Mon, 17 Aug 2015 05:56:57 +0000 (07:56 +0200)
committerTom Gundersen <teg@jklm.no>
Wed, 16 Sep 2015 15:03:17 +0000 (17:03 +0200)
commit5643c00afe29eae4b2e3575277038e60e6967d09
treef3196293051dc93ee58eb06421df9367dc794f17
parent8e427d9be93e1289eba2a3055bbc632babc75b81
resolved: cache - handle CNAME redirection

CNAME records are special in the way they are treated by DNS servers,
and our cache should mimic that behavior: In case a domain name has an
alias, its CNAME record is returned in place of any other.

Our cache was not doing this despite caching the CNAME records, this
entailed needless lookups to re-resolve the CNAME.
src/resolve/resolved-bus.c
src/resolve/resolved-dns-cache.c