/[svn]/ircd-hybrid/trunk/src/conf_class.c
ViewVC logotype

Diff of /ircd-hybrid/trunk/src/conf_class.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9882 by michael, Fri Jan 1 04:43:22 2021 UTC revision 9883 by michael, Fri Jan 15 13:47:18 2021 UTC
# Line 208  class_ip_limit_add(struct ClassItem *cla Line 208  class_ip_limit_add(struct ClassItem *cla
208      return false;      return false;
209    
210    patricia_node_t *pnode = patricia_make_and_lookup_addr(class_ip_limit_trie(class, addr), addr, bitlen);    patricia_node_t *pnode = patricia_make_and_lookup_addr(class_ip_limit_trie(class, addr), addr, bitlen);
211    if (((uintptr_t)pnode->data) >= class->number_per_cidr && over_rule == false)    if (((uintptr_t)pnode->data) >= class->number_per_cidr)
212      {
213        if (over_rule == true)
214          /*
215           * In case of overruling, we continue with the client registration process
216           * which means we expect a class_ip_limit_remove() call when detaching the
217           * configuration record upon client exit, therefore pnode->data has to be
218           * increased.
219           */
220          PATRICIA_DATA_SET(pnode, (((uintptr_t)pnode->data) + 1));
221    
222      return true;      return true;
223      }
224    
225    PATRICIA_DATA_SET(pnode, (((uintptr_t)pnode->data) + 1));    PATRICIA_DATA_SET(pnode, (((uintptr_t)pnode->data) + 1));
226    return false;    return false;

Legend:
Removed from v.9882  
changed lines
  Added in v.9883

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28