dnsproxy: Delete expired cache entries when they expire
authorArjan van de Ven <arjan@linux.intel.com>
Tue, 10 Jan 2012 00:08:25 +0000 (16:08 -0800)
committerDaniel Wagner <daniel.wagner@bmw-carit.de>
Tue, 10 Jan 2012 12:43:57 +0000 (13:43 +0100)
commit3d849d116f85c656a97d07937f73307399babc07
tree71b2659f045f6a533107633a0810256f9c0461f9
parent7303b631c5fa7a5260f1e80f833079d001bcec40
dnsproxy: Delete expired cache entries when they expire

The DNS cache has logic to never replace cached data if it already exists.
However, this only works well if we actually delete the data parts
of the cache entries as they expire.

This patch creates a cache_enforce_validity() function, which will
delete the data portion of cache entries if they are expired.
With this in place, consecutive lookups of the same name can get
cached again.
src/dnsproxy.c