/[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 8607 by michael, Mon Oct 29 21:26:54 2018 UTC revision 8608 by michael, Mon Oct 29 22:09:25 2018 UTC
# Line 176  class_delete_marked(void) Line 176  class_delete_marked(void)
176  }  }
177    
178  int  int
179  class_ip_limit_add(struct ClassItem *class, struct sockaddr *addr, int over_rule)  class_ip_limit_add(struct ClassItem *class, void *addr, int over_rule)
180  {  {
181    int bitlen;    int bitlen;
182    
183    if (addr->sa_family == AF_INET6)    if (((struct sockaddr *)addr)->sa_family == AF_INET6)
184      bitlen = class->cidr_bitlen_ipv6;      bitlen = class->cidr_bitlen_ipv6;
185    else    else
186      bitlen = class->cidr_bitlen_ipv4;      bitlen = class->cidr_bitlen_ipv4;
# Line 197  class_ip_limit_add(struct ClassItem *cla Line 197  class_ip_limit_add(struct ClassItem *cla
197  }  }
198    
199  int  int
200  class_ip_limit_remove(struct ClassItem *class, struct sockaddr *addr)  class_ip_limit_remove(struct ClassItem *class, void *addr)
201  {  {
202    int bitlen;    int bitlen;
203    
204    if (addr->sa_family == AF_INET6)    if (((struct sockaddr *)addr)->sa_family == AF_INET6)
205      bitlen = class->cidr_bitlen_ipv6;      bitlen = class->cidr_bitlen_ipv6;
206    else    else
207      bitlen = class->cidr_bitlen_ipv4;      bitlen = class->cidr_bitlen_ipv4;
# Line 238  class_ip_limit_rebuild(struct ClassItem Line 238  class_ip_limit_rebuild(struct ClassItem
238    
239      if (conf->type == CONF_CLIENT)      if (conf->type == CONF_CLIENT)
240        if (conf->class == class)        if (conf->class == class)
241          class_ip_limit_add(class, (struct sockaddr *)&client_p->ip, 1);          class_ip_limit_add(class, &client_p->ip, 1);
242    }    }
243  }  }

Legend:
Removed from v.8607  
changed lines
  Added in v.8608

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