mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
unbound control removed items are not counted again.
git-svn-id: file:///svn/unbound/trunk@2061 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
bc4770ea7d
commit
efb19fd26a
2 changed files with 18 additions and 6 deletions
|
|
@ -1116,6 +1116,8 @@ struct del_info {
|
||||||
size_t len;
|
size_t len;
|
||||||
/** labels */
|
/** labels */
|
||||||
int labs;
|
int labs;
|
||||||
|
/** now */
|
||||||
|
uint32_t now;
|
||||||
/** time to invalidate to */
|
/** time to invalidate to */
|
||||||
uint32_t expired;
|
uint32_t expired;
|
||||||
/** number of rrsets removed */
|
/** number of rrsets removed */
|
||||||
|
|
@ -1136,9 +1138,11 @@ zone_del_rrset(struct lruhash_entry* e, void* arg)
|
||||||
if(dname_subdomain_c(k->rk.dname, inf->name)) {
|
if(dname_subdomain_c(k->rk.dname, inf->name)) {
|
||||||
struct packed_rrset_data* d =
|
struct packed_rrset_data* d =
|
||||||
(struct packed_rrset_data*)e->data;
|
(struct packed_rrset_data*)e->data;
|
||||||
|
if(d->ttl >= inf->now) {
|
||||||
d->ttl = inf->expired;
|
d->ttl = inf->expired;
|
||||||
inf->num_rrsets++;
|
inf->num_rrsets++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** callback to delete messages in a zone */
|
/** callback to delete messages in a zone */
|
||||||
|
|
@ -1150,9 +1154,11 @@ zone_del_msg(struct lruhash_entry* e, void* arg)
|
||||||
struct msgreply_entry* k = (struct msgreply_entry*)e->key;
|
struct msgreply_entry* k = (struct msgreply_entry*)e->key;
|
||||||
if(dname_subdomain_c(k->key.qname, inf->name)) {
|
if(dname_subdomain_c(k->key.qname, inf->name)) {
|
||||||
struct reply_info* d = (struct reply_info*)e->data;
|
struct reply_info* d = (struct reply_info*)e->data;
|
||||||
|
if(d->ttl >= inf->now) {
|
||||||
d->ttl = inf->expired;
|
d->ttl = inf->expired;
|
||||||
inf->num_msgs++;
|
inf->num_msgs++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** callback to delete keys in zone */
|
/** callback to delete keys in zone */
|
||||||
|
|
@ -1164,9 +1170,11 @@ zone_del_kcache(struct lruhash_entry* e, void* arg)
|
||||||
struct key_entry_key* k = (struct key_entry_key*)e->key;
|
struct key_entry_key* k = (struct key_entry_key*)e->key;
|
||||||
if(dname_subdomain_c(k->name, inf->name)) {
|
if(dname_subdomain_c(k->name, inf->name)) {
|
||||||
struct key_entry_data* d = (struct key_entry_data*)e->data;
|
struct key_entry_data* d = (struct key_entry_data*)e->data;
|
||||||
|
if(d->ttl >= inf->now) {
|
||||||
d->ttl = inf->expired;
|
d->ttl = inf->expired;
|
||||||
inf->num_keys++;
|
inf->num_keys++;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** remove all rrsets and keys from zone from cache */
|
/** remove all rrsets and keys from zone from cache */
|
||||||
|
|
@ -1185,6 +1193,7 @@ do_flush_zone(SSL* ssl, struct worker* worker, char* arg)
|
||||||
inf.name = nm;
|
inf.name = nm;
|
||||||
inf.len = nmlen;
|
inf.len = nmlen;
|
||||||
inf.labs = nmlabs;
|
inf.labs = nmlabs;
|
||||||
|
inf.now = *worker->env.now;
|
||||||
inf.expired = *worker->env.now;
|
inf.expired = *worker->env.now;
|
||||||
inf.expired -= 3; /* handle 3 seconds skew between threads */
|
inf.expired -= 3; /* handle 3 seconds skew between threads */
|
||||||
inf.num_rrsets = 0;
|
inf.num_rrsets = 0;
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
24 March 2010: Wouter
|
||||||
|
- unbound control flushed items are not counted when flushed again.
|
||||||
|
|
||||||
23 March 2010: Wouter
|
23 March 2010: Wouter
|
||||||
- iana portlist updated.
|
- iana portlist updated.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue