446 |
|
int fam, const char *username, const char *password, int do_match) |
447 |
|
{ |
448 |
|
unsigned int hprecv = 0; |
449 |
< |
dlink_node *ptr = NULL; |
449 |
> |
dlink_node *node = NULL; |
450 |
|
struct MaskItem *hprec = NULL; |
451 |
|
struct AddressRec *arec = NULL; |
452 |
|
int b; |
459 |
|
{ |
460 |
|
for (b = 128; b >= 0; b -= 16) |
461 |
|
{ |
462 |
< |
DLINK_FOREACH(ptr, atable[hash_ipv6(addr, b)].head) |
462 |
> |
DLINK_FOREACH(node, atable[hash_ipv6(addr, b)].head) |
463 |
|
{ |
464 |
< |
arec = ptr->data; |
464 |
> |
arec = node->data; |
465 |
|
|
466 |
|
if ((arec->type == type) && |
467 |
|
arec->precedence > hprecv && |
482 |
|
{ |
483 |
|
for (b = 32; b >= 0; b -= 8) |
484 |
|
{ |
485 |
< |
DLINK_FOREACH(ptr, atable[hash_ipv4(addr, b)].head) |
485 |
> |
DLINK_FOREACH(node, atable[hash_ipv4(addr, b)].head) |
486 |
|
{ |
487 |
< |
arec = ptr->data; |
487 |
> |
arec = node->data; |
488 |
|
|
489 |
|
if ((arec->type == type) && |
490 |
|
arec->precedence > hprecv && |
509 |
|
|
510 |
|
while (1) |
511 |
|
{ |
512 |
< |
DLINK_FOREACH(ptr, atable[hash_text(p)].head) |
512 |
> |
DLINK_FOREACH(node, atable[hash_text(p)].head) |
513 |
|
{ |
514 |
< |
arec = ptr->data; |
514 |
> |
arec = node->data; |
515 |
|
if ((arec->type == type) && |
516 |
|
arec->precedence > hprecv && |
517 |
|
(arec->masktype == HM_HOST) && |
530 |
|
++p; |
531 |
|
} |
532 |
|
|
533 |
< |
DLINK_FOREACH(ptr, atable[0].head) |
533 |
> |
DLINK_FOREACH(node, atable[0].head) |
534 |
|
{ |
535 |
< |
arec = ptr->data; |
535 |
> |
arec = node->data; |
536 |
|
|
537 |
|
if (arec->type == type && |
538 |
|
arec->precedence > hprecv && |
666 |
|
{ |
667 |
|
int bits = 0; |
668 |
|
uint32_t hv = 0; |
669 |
< |
dlink_node *ptr = NULL; |
669 |
> |
dlink_node *node = NULL; |
670 |
|
struct irc_ssaddr addr; |
671 |
|
|
672 |
|
switch (parse_netmask(address, &addr, &bits)) |
686 |
|
break; |
687 |
|
} |
688 |
|
|
689 |
< |
DLINK_FOREACH(ptr, atable[hv].head) |
689 |
> |
DLINK_FOREACH(node, atable[hv].head) |
690 |
|
{ |
691 |
< |
struct AddressRec *arec = ptr->data; |
691 |
> |
struct AddressRec *arec = node->data; |
692 |
|
|
693 |
|
if (arec->conf == conf) |
694 |
|
{ |
713 |
|
void |
714 |
|
clear_out_address_conf(void) |
715 |
|
{ |
716 |
< |
dlink_node *ptr = NULL, *ptr_next = NULL; |
716 |
> |
dlink_node *node = NULL, *node_next = NULL; |
717 |
|
|
718 |
|
for (unsigned int i = 0; i < ATABLE_SIZE; ++i) |
719 |
|
{ |
720 |
< |
DLINK_FOREACH_SAFE(ptr, ptr_next, atable[i].head) |
720 |
> |
DLINK_FOREACH_SAFE(node, node_next, atable[i].head) |
721 |
|
{ |
722 |
< |
struct AddressRec *arec = ptr->data; |
722 |
> |
struct AddressRec *arec = node->data; |
723 |
|
|
724 |
|
/* |
725 |
|
* We keep the temporary K-lines and destroy the permanent ones, |
769 |
|
void |
770 |
|
hostmask_expire_temporary(void) |
771 |
|
{ |
772 |
< |
dlink_node *ptr = NULL, *ptr_next = NULL; |
772 |
> |
dlink_node *node = NULL, *node_next = NULL; |
773 |
|
|
774 |
|
for (unsigned int i = 0; i < ATABLE_SIZE; ++i) |
775 |
|
{ |
776 |
< |
DLINK_FOREACH_SAFE(ptr, ptr_next, atable[i].head) |
776 |
> |
DLINK_FOREACH_SAFE(node, node_next, atable[i].head) |
777 |
|
{ |
778 |
< |
struct AddressRec *arec = ptr->data; |
778 |
> |
struct AddressRec *arec = node->data; |
779 |
|
|
780 |
|
if (!arec->conf->until || arec->conf->until > CurrentTime) |
781 |
|
continue; |