mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 14:53:15 -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;
|
||||
/** labels */
|
||||
int labs;
|
||||
/** now */
|
||||
uint32_t now;
|
||||
/** time to invalidate to */
|
||||
uint32_t expired;
|
||||
/** number of rrsets removed */
|
||||
|
|
@ -1136,8 +1138,10 @@ zone_del_rrset(struct lruhash_entry* e, void* arg)
|
|||
if(dname_subdomain_c(k->rk.dname, inf->name)) {
|
||||
struct packed_rrset_data* d =
|
||||
(struct packed_rrset_data*)e->data;
|
||||
d->ttl = inf->expired;
|
||||
inf->num_rrsets++;
|
||||
if(d->ttl >= inf->now) {
|
||||
d->ttl = inf->expired;
|
||||
inf->num_rrsets++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1150,8 +1154,10 @@ zone_del_msg(struct lruhash_entry* e, void* arg)
|
|||
struct msgreply_entry* k = (struct msgreply_entry*)e->key;
|
||||
if(dname_subdomain_c(k->key.qname, inf->name)) {
|
||||
struct reply_info* d = (struct reply_info*)e->data;
|
||||
d->ttl = inf->expired;
|
||||
inf->num_msgs++;
|
||||
if(d->ttl >= inf->now) {
|
||||
d->ttl = inf->expired;
|
||||
inf->num_msgs++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1164,8 +1170,10 @@ zone_del_kcache(struct lruhash_entry* e, void* arg)
|
|||
struct key_entry_key* k = (struct key_entry_key*)e->key;
|
||||
if(dname_subdomain_c(k->name, inf->name)) {
|
||||
struct key_entry_data* d = (struct key_entry_data*)e->data;
|
||||
d->ttl = inf->expired;
|
||||
inf->num_keys++;
|
||||
if(d->ttl >= inf->now) {
|
||||
d->ttl = inf->expired;
|
||||
inf->num_keys++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1185,6 +1193,7 @@ do_flush_zone(SSL* ssl, struct worker* worker, char* arg)
|
|||
inf.name = nm;
|
||||
inf.len = nmlen;
|
||||
inf.labs = nmlabs;
|
||||
inf.now = *worker->env.now;
|
||||
inf.expired = *worker->env.now;
|
||||
inf.expired -= 3; /* handle 3 seconds skew between threads */
|
||||
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
|
||||
- iana portlist updated.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue