| 481 |
|
{ |
| 482 |
|
arec = ptr->data; |
| 483 |
|
|
| 484 |
< |
if (arec->type == (type & ~0x1) && |
| 484 |
> |
if ((arec->type == type) && |
| 485 |
|
arec->precedence > hprecv && |
| 486 |
|
arec->masktype == HM_IPV6 && |
| 487 |
|
match_ipv6(addr, &arec->Mask.ipa.addr, |
| 488 |
|
arec->Mask.ipa.bits) && |
| 489 |
< |
(type & 0x1 || !cmpfunc(arec->username, username)) && |
| 489 |
> |
(!username || !cmpfunc(arec->username, username)) && |
| 490 |
|
(IsNeedPassword(arec->conf) || arec->conf->passwd == NULL || |
| 491 |
|
match_conf_password(password, arec->conf))) |
| 492 |
|
{ |
| 506 |
|
{ |
| 507 |
|
arec = ptr->data; |
| 508 |
|
|
| 509 |
< |
if (arec->type == (type & ~0x1) && |
| 509 |
> |
if ((arec->type == type) && |
| 510 |
|
arec->precedence > hprecv && |
| 511 |
|
arec->masktype == HM_IPV4 && |
| 512 |
|
match_ipv4(addr, &arec->Mask.ipa.addr, |
| 513 |
|
arec->Mask.ipa.bits) && |
| 514 |
< |
(type & 0x1 || !cmpfunc(arec->username, username)) && |
| 514 |
> |
(!username || !cmpfunc(arec->username, username)) && |
| 515 |
|
(IsNeedPassword(arec->conf) || arec->conf->passwd == NULL || |
| 516 |
|
match_conf_password(password, arec->conf))) |
| 517 |
|
{ |
| 532 |
|
DLINK_FOREACH(ptr, atable[hash_text(p)].head) |
| 533 |
|
{ |
| 534 |
|
arec = ptr->data; |
| 535 |
< |
if ((arec->type == (type & ~0x1)) && |
| 535 |
> |
if ((arec->type == type) && |
| 536 |
|
arec->precedence > hprecv && |
| 537 |
|
(arec->masktype == HM_HOST) && |
| 538 |
|
!cmpfunc(arec->Mask.hostname, name) && |
| 539 |
< |
(type & 0x1 || !cmpfunc(arec->username, username)) && |
| 539 |
> |
(!username || !cmpfunc(arec->username, username)) && |
| 540 |
|
(IsNeedPassword(arec->conf) || arec->conf->passwd == NULL || |
| 541 |
|
match_conf_password(password, arec->conf))) |
| 542 |
|
{ |
| 554 |
|
{ |
| 555 |
|
arec = ptr->data; |
| 556 |
|
|
| 557 |
< |
if (arec->type == (type & ~0x1) && |
| 557 |
> |
if (arec->type == type && |
| 558 |
|
arec->precedence > hprecv && |
| 559 |
|
arec->masktype == HM_HOST && |
| 560 |
|
!cmpfunc(arec->Mask.hostname, name) && |
| 561 |
< |
(type & 0x1 || !cmpfunc(arec->username, username)) && |
| 561 |
> |
(!username || !cmpfunc(arec->username, username)) && |
| 562 |
|
(IsNeedPassword(arec->conf) || arec->conf->passwd == NULL || |
| 563 |
|
match_conf_password(password, arec->conf))) |
| 564 |
|
{ |
| 623 |
|
{ |
| 624 |
|
struct MaskItem *eline; |
| 625 |
|
|
| 626 |
< |
eline = find_conf_by_address(NULL, addr, CONF_EXEMPT | 1, aftype, |
| 627 |
< |
NULL, NULL, 1); |
| 626 |
> |
eline = find_conf_by_address(NULL, addr, CONF_EXEMPT, aftype, NULL, NULL, 1); |
| 627 |
|
if (eline != NULL) |
| 628 |
|
return eline; |
| 629 |
|
|
| 630 |
< |
return find_conf_by_address(NULL, addr, CONF_DLINE | 1, aftype, NULL, NULL, 1); |
| 630 |
> |
return find_conf_by_address(NULL, addr, CONF_DLINE, aftype, NULL, NULL, 1); |
| 631 |
|
} |
| 632 |
|
|
| 633 |
|
/* void add_conf_by_address(int, struct MaskItem *aconf) |