dnsproxy: Cache negative IPv6 entries for the case where we have an IPv4 entry already
authorArjan van de Ven <arjan@linux.intel.com>
Tue, 10 Jan 2012 00:08:37 +0000 (16:08 -0800)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 10 Jan 2012 12:43:57 +0000 (13:43 +0100)
commitc008187195ccf10b70c5aba319b0fc73932db1f2
treeddb46b7ef2a82eadfdf6050475c7efe02bb94f10
parenta4915bd9cf0cf5bed585385a625390f0d003bef1
dnsproxy: Cache negative IPv6 entries for the case where we have an IPv4 entry already

It's very common for a client to ask for both IPv4 and IPv6 entries for a name,
however until now, Connman would only cache the IPv4 entry. The result is that the
client app still has the full latency of a lookup, the one for the AAAA record.

This patch will cause Connman to cache negative IPv6 entries, but only if a valid
IPv4 entry is already in the cache. The TTL for this negative entry is set to
the TTL of the existing IPv4 entry, with the rationale that these entries go together
anyway.
src/dnsproxy.c