X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=blobdiff_plain;f=cache.c;h=c78a3b7a9b438118b369c68c3102fd62cad0b9ee;hp=812478e44de0664ee17ae0842b39bb674cf0632f;hb=2b6893cdb811c57ff0fc01cdd75f86d3e5567c3f;hpb=757999da757fbf85bb5fec13bd8e4d546f833bfc;ds=sidebyside diff --git a/cache.c b/cache.c index 812478e..c78a3b7 100644 --- a/cache.c +++ b/cache.c @@ -301,7 +301,7 @@ cache_answer(struct interface *iface, uint8_t *base, int blen, char *name, struc if (r) { if (!a->ttl) { DBG(1, "D -> %s %s ttl:%d\n", dns_type_string(r->type), r->record, r->ttl); - cache_record_free(r); + r->time = time(0) + 1 - r->ttl; } else { r->ttl = a->ttl; DBG(1, "A -> %s %s ttl:%d\n", dns_type_string(r->type), r->record, r->ttl);