Only count throttle entries that cause rejection in /stats t.
This commit is contained in:
parent
ae09cb7dbe
commit
16ef24cf38
1 changed files with 15 additions and 1 deletions
16
src/reject.c
16
src/reject.c
|
@ -125,7 +125,21 @@ init_reject(void)
|
||||||
unsigned long
|
unsigned long
|
||||||
throttle_size(void)
|
throttle_size(void)
|
||||||
{
|
{
|
||||||
return rb_dlink_list_length(&throttle_list);
|
unsigned long count;
|
||||||
|
rb_dlink_node *ptr;
|
||||||
|
rb_patricia_node_t *pnode;
|
||||||
|
throttle_t *t;
|
||||||
|
|
||||||
|
count = 0;
|
||||||
|
RB_DLINK_FOREACH(ptr, throttle_list.head)
|
||||||
|
{
|
||||||
|
pnode = ptr->data;
|
||||||
|
t = pnode->data;
|
||||||
|
if (t->count > ConfigFileEntry.throttle_count)
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue