466 |
#ifdef USE_SQL |
#ifdef USE_SQL |
467 |
radiusd_sql_clear_cache(); |
radiusd_sql_clear_cache(); |
468 |
#endif |
#endif |
469 |
|
|
470 |
|
if (radreq->code == RT_AUTHENTICATION_REQUEST |
471 |
|
&& rad_auth_check_username(radreq, req->fd)) |
472 |
|
return 1; |
473 |
|
|
474 |
/* Add any specific attributes for this username. */ |
/* Add any specific attributes for this username. */ |
475 |
hints_setup(radreq); |
hints_setup(radreq); |
476 |
|
|
480 |
stat_inc(auth, radreq->ipaddr, num_access_req); |
stat_inc(auth, radreq->ipaddr, num_access_req); |
481 |
if (rad_auth_init(radreq, req->fd) < 0) |
if (rad_auth_init(radreq, req->fd) < 0) |
482 |
return 1; |
return 1; |
483 |
/*FALLTHRU*/ |
if (proxy_send(req) != 0) |
484 |
|
return 0; |
485 |
|
break; |
486 |
|
|
487 |
case RT_ACCOUNTING_REQUEST: |
case RT_ACCOUNTING_REQUEST: |
488 |
if (proxy_send(req) != 0) { |
stat_inc(acct, radreq->ipaddr, num_req); |
489 |
|
if (proxy_send(req) != 0) |
490 |
return 0; |
return 0; |
|
} |
|
491 |
break; |
break; |
492 |
|
|
493 |
case RT_AUTHENTICATION_ACK: |
case RT_AUTHENTICATION_ACK: |