Fix refreshing cached A(AAA) records that expire
authorRafał Miłecki <rafal@milecki.pl>
Mon, 20 Mar 2017 10:45:07 +0000 (11:45 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Mon, 20 Mar 2017 11:34:24 +0000 (12:34 +0100)
commitf89986b67dd5256c6570e563c81aded4d39bc002
treef3970217b0206d757e99c0d232f864c04d9588c9
parentfd5a160a15c48a97f7fc755c1310f17c869f0233
Fix refreshing cached A(AAA) records that expire

Old code was trying to refresh record after it has already expired. Now
it tries after 50% of TTL has passed - we do the same for other records.

Fixes: 80dd24602480 ("Refresh DNS records A and AAAA directly")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: John Crispin <john@phrozen.org>
cache.c