| 562 | } |
| 563 | |
| 564 | int alwaysauth(struct clientparam * param){ |
| 565 | int res; |
| 566 | struct trafcount * tc; |
| 567 | int countout = 0; |
| 568 | |
| 569 | res = doconnect(param); |
| 570 | if(!res){ |
| 571 | initbandlims(param); |
| 572 | for(tc = conf.trafcounter; tc; tc = tc->next) { |
| 573 | if(tc->disabled) continue; |
| 574 | if(ACLmatches(tc->ace, param)){ |
| 575 | if(tc->ace->action == NOCOUNTIN) break; |
| 576 | if(tc->ace->action != COUNTIN) { |
| 577 | countout = 1; |
| 578 | continue; |
| 579 | } |
| 580 | |
| 581 | if(tc->traflim64 <= tc->traf64) return 10; |
| 582 | param->trafcountfunc = conf.trafcountfunc; |
| 583 | param->maxtrafin64 = tc->traflim64 - tc->traf64; |
| 584 | } |
| 585 | } |
| 586 | if(countout)for(tc = conf.trafcounter; tc; tc = tc->next) { |
| 587 | if(tc->disabled) continue; |
| 588 | if(ACLmatches(tc->ace, param)){ |
| 589 | if(tc->ace->action == NOCOUNTOUT) break; |
| 590 | if(tc->ace->action != COUNTOUT) { |
| 591 | continue; |
| 592 | } |
| 593 | |
| 594 | if(tc->traflim64 <= tc->traf64) return 10; |
| 595 | param->trafcountfunc = conf.trafcountfunc; |
| 596 | param->maxtrafout64 = tc->traflim64 - tc->traf64; |
| 597 | } |
| 598 | } |
| 599 | |
| 600 | } |
| 601 | return res; |
| 602 | } |
| 603 | |
| 604 | int checkACL(struct clientparam * param){ |
| 605 | struct ace* acentry; |
no test coverage detected