X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fplugins%2Fradius%2Fradius.c;h=c73ca0b53ef82b07932fa304d667ff22e0d7db7a;hb=11febba74597dc22b1f2611db14537e3e81a11bc;hp=02875b4fec2069de9d31339b80df793bf8a709e5;hpb=607d8eadccfd62c1fa84a36bd1440bd48b4e55ca;p=ppp.git diff --git a/pppd/plugins/radius/radius.c b/pppd/plugins/radius/radius.c index 02875b4..c73ca0b 100644 --- a/pppd/plugins/radius/radius.c +++ b/pppd/plugins/radius/radius.c @@ -33,16 +33,20 @@ static char const RCSID[] = #include #include #include +#include +#include #include -#include +#include +#include +#include #ifdef PPP_WITH_CHAPMS #include #ifdef PPP_WITH_MPPE #include -#include #endif #endif +#include #include #include @@ -50,8 +54,6 @@ static char const RCSID[] = #define BUF_LEN 1024 -#define MD5_HASH_SIZE 16 - #define MSDNS 1 static char *config_file = NULL; @@ -72,28 +74,20 @@ static option_t Options[] = { { NULL } }; -static int radius_secret_check(void); -static int radius_pap_auth(char *user, - char *passwd, - char **msgp, - struct wordlist **paddrs, - struct wordlist **popts); -static int radius_chap_verify(char *user, char *ourname, int id, - struct chap_digest_type *digest, - unsigned char *challenge, - unsigned char *response, - char *message, int message_space); +static pap_check_hook_fn radius_secret_check; +static pap_auth_hook_fn radius_pap_auth; +static chap_verify_hook_fn radius_chap_verify; static void radius_ip_up(void *opaque, int arg); static void radius_ip_down(void *opaque, int arg); -static void make_username_realm(char *user); +static void make_username_realm(const char *user); static int radius_setparams(VALUE_PAIR *vp, char *msg, REQUEST_INFO *req_info, struct chap_digest_type *digest, unsigned char *challenge, char *message, int message_space); static void radius_choose_ip(u_int32_t *addrp); static int radius_init(char *msg); -static int get_client_port(char *ifname); +static int get_client_port(const char *ifname); static int radius_allowed_address(u_int32_t addr); static void radius_acct_interim(void *); #ifdef PPP_WITH_MPPE @@ -162,15 +156,15 @@ plugin_init(void) ip_choose_hook = radius_choose_ip; allowed_address_hook = radius_allowed_address; - add_notifier(&ip_up_notifier, radius_ip_up, NULL); - add_notifier(&ip_down_notifier, radius_ip_down, NULL); + ppp_add_notify(NF_IP_UP, radius_ip_up, NULL); + ppp_add_notify(NF_IP_DOWN, radius_ip_down, NULL); memset(&rstate, 0, sizeof(rstate)); strlcpy(rstate.config_file, "/etc/radiusclient/radiusclient.conf", sizeof(rstate.config_file)); - add_options(Options); + ppp_add_options(Options); info("RADIUS plugin initialized."); } @@ -254,6 +248,8 @@ radius_pap_auth(char *user, UINT4 av_type; int result; static char radius_msg[BUF_LEN]; + const char *remote_number; + const char *ipparam; radius_msg[0] = 0; *msgp = radius_msg; @@ -276,7 +272,7 @@ radius_pap_auth(char *user, /* Hack... the "port" is the ppp interface number. Should really be the tty */ - rstate.client_port = get_client_port(portnummap ? devnam : ifname); + rstate.client_port = get_client_port(portnummap ? ppp_devnam() : ppp_ifname()); av_type = PW_FRAMED; rc_avpair_add(&send, PW_SERVICE_TYPE, &av_type, 0, VENDOR_NONE); @@ -286,7 +282,9 @@ radius_pap_auth(char *user, rc_avpair_add(&send, PW_USER_NAME, rstate.user , 0, VENDOR_NONE); rc_avpair_add(&send, PW_USER_PASSWORD, passwd, 0, VENDOR_NONE); - if (*remote_number) { + remote_number = ppp_get_remote_number(); + ipparam = ppp_ipparam(); + if (remote_number) { rc_avpair_add(&send, PW_CALLING_STATION_ID, remote_number, 0, VENDOR_NONE); } else if (ipparam) @@ -351,6 +349,8 @@ radius_chap_verify(char *user, char *ourname, int id, #else REQUEST_INFO *req_info = NULL; #endif + const char *remote_number; + const char *ipparam; challenge_len = *challenge++; response_len = *response++; @@ -376,7 +376,7 @@ radius_chap_verify(char *user, char *ourname, int id, /* Put user with potentially realm added in rstate.user */ if (!rstate.done_chap_once) { make_username_realm(user); - rstate.client_port = get_client_port (portnummap ? devnam : ifname); + rstate.client_port = get_client_port (portnummap ? ppp_devnam() : ppp_ifname()); if (radius_pre_auth_hook) { radius_pre_auth_hook(rstate.user, &rstate.authserver, @@ -400,15 +400,15 @@ radius_chap_verify(char *user, char *ourname, int id, switch (digest->code) { case CHAP_MD5: /* CHAP-Challenge and CHAP-Password */ - if (response_len != MD5_HASH_SIZE) + if (response_len != MD5_DIGEST_LENGTH) return 0; cpassword[0] = id; - memcpy(&cpassword[1], response, MD5_HASH_SIZE); + memcpy(&cpassword[1], response, MD5_DIGEST_LENGTH); rc_avpair_add(&send, PW_CHAP_CHALLENGE, challenge, challenge_len, VENDOR_NONE); rc_avpair_add(&send, PW_CHAP_PASSWORD, - cpassword, MD5_HASH_SIZE + 1, VENDOR_NONE); + cpassword, MD5_DIGEST_LENGTH + 1, VENDOR_NONE); break; #ifdef PPP_WITH_CHAPMS @@ -453,7 +453,9 @@ radius_chap_verify(char *user, char *ourname, int id, #endif } - if (*remote_number) { + remote_number = ppp_get_remote_number(); + ipparam = ppp_ipparam(); + if (remote_number) { rc_avpair_add(&send, PW_CALLING_STATION_ID, remote_number, 0, VENDOR_NONE); } else if (ipparam) @@ -506,7 +508,7 @@ radius_chap_verify(char *user, char *ourname, int id, * then the default realm from the radiusclient config file is added. ***********************************************************************/ static void -make_username_realm(char *user) +make_username_realm(const char *user) { char *default_realm; @@ -592,27 +594,27 @@ radius_setparams(VALUE_PAIR *vp, char *msg, REQUEST_INFO *req_info, case PW_SESSION_TIMEOUT: /* Session timeout */ - maxconnect = vp->lvalue; + ppp_set_max_connect_time(vp->lvalue); break; case PW_FILTER_ID: /* packet filter, will be handled via ip-(up|down) script */ - script_setenv("RADIUS_FILTER_ID", (char*) vp->strvalue, 1); + ppp_script_setenv("RADIUS_FILTER_ID", (char*) vp->strvalue, 1); break; case PW_FRAMED_ROUTE: /* route, will be handled via ip-(up|down) script */ - script_setenv("RADIUS_FRAMED_ROUTE", (char*) vp->strvalue, 1); + ppp_script_setenv("RADIUS_FRAMED_ROUTE", (char*) vp->strvalue, 1); break; case PW_IDLE_TIMEOUT: /* idle parameter */ - idle_time_limit = vp->lvalue; + ppp_set_max_idle_time(vp->lvalue); break; case PW_SESSION_OCTETS_LIMIT: /* Session traffic limit */ - maxoctets = vp->lvalue; + ppp_set_session_limit(vp->lvalue); break; case PW_OCTETS_DIRECTION: /* Session traffic limit direction check */ - maxoctets_dir = ( vp->lvalue > 4 ) ? 0 : vp->lvalue ; + ppp_set_session_limit_dir(vp->lvalue); break; case PW_ACCT_INTERIM_INTERVAL: /* Send accounting updates every few seconds */ @@ -633,7 +635,7 @@ radius_setparams(VALUE_PAIR *vp, char *msg, REQUEST_INFO *req_info, } else if (remote != 0xfffffffe) { /* 0xfffffffe means NAS should select an ip address */ remote = htonl(vp->lvalue); - if (bad_ip_adrs (remote)) { + if (ppp_bad_ip_addr (remote)) { slprintf(msg, BUF_LEN, "RADIUS: bad remote IP address %I for %s", remote, rstate.user); return -1; @@ -647,13 +649,14 @@ radius_setparams(VALUE_PAIR *vp, char *msg, REQUEST_INFO *req_info, break; case PW_CLASS: /* Save Class attribute to pass it in accounting request */ - if (vp->lvalue <= MAXCLASSLEN) { + // if (vp->lvalue <= MAXCLASSLEN) { // <- Attribute could be this big, but vp->strvalue is limited to AUTH_STRING_LEN characters + if (vp->lvalue <= AUTH_STRING_LEN) { rstate.class_len=vp->lvalue; memcpy(rstate.class, vp->strvalue, rstate.class_len); } /* else too big for our buffer - ignore it */ break; case PW_FRAMED_MTU: - netif_set_mtu(rstate.client_port,MIN(netif_get_mtu(rstate.client_port),vp->lvalue)); + ppp_set_mtu(rstate.client_port,MIN(ppp_get_mtu(rstate.client_port),vp->lvalue)); break; } @@ -772,9 +775,12 @@ radius_setmppekeys(VALUE_PAIR *vp, REQUEST_INFO *req_info, unsigned char *challenge) { int i; - MD5_CTX Context; - u_char plain[32]; - u_char buf[16]; + int status = 0; + PPP_MD_CTX *ctx; + unsigned char plain[32]; + unsigned char buf[MD5_DIGEST_LENGTH]; + unsigned int buflen; + if (vp->lvalue != 32) { error("RADIUS: Incorrect attribute length (%d) for MS-CHAP-MPPE-Keys", @@ -784,30 +790,70 @@ radius_setmppekeys(VALUE_PAIR *vp, REQUEST_INFO *req_info, memcpy(plain, vp->strvalue, sizeof(plain)); - MD5_Init(&Context); - MD5_Update(&Context, req_info->secret, strlen(req_info->secret)); - MD5_Update(&Context, req_info->request_vector, AUTH_VECTOR_LEN); - MD5_Final(buf, &Context); + ctx = PPP_MD_CTX_new(); + if (ctx) { - for (i = 0; i < 16; i++) - plain[i] ^= buf[i]; + if (PPP_DigestInit(ctx, PPP_md5())) { - MD5_Init(&Context); - MD5_Update(&Context, req_info->secret, strlen(req_info->secret)); - MD5_Update(&Context, vp->strvalue, 16); - MD5_Final(buf, &Context); + if (PPP_DigestUpdate(ctx, req_info->secret, strlen(req_info->secret))) { - for(i = 0; i < 16; i++) - plain[i + 16] ^= buf[i]; + if (PPP_DigestUpdate(ctx, req_info->request_vector, AUTH_VECTOR_LEN)) { - /* - * Annoying. The "key" returned is just the NTPasswordHashHash, which - * the NAS (us) doesn't need; we only need the start key. So we have - * to generate the start key, sigh. NB: We do not support the LM-Key. - */ - mppe_set_chapv1(challenge, &plain[8]); + buflen = sizeof(buf); + if (PPP_DigestFinal(ctx, buf, &buflen)) { + + status = 1; + } + } + } + } + PPP_MD_CTX_free(ctx); + } + + if (status) { + + for (i = 0; i < MD5_DIGEST_LENGTH; i++) { + plain[i] ^= buf[i]; + } + + status = 0; + ctx = PPP_MD_CTX_new(); + if (ctx) { + + if (PPP_DigestInit(ctx, PPP_md5())) { + + if (PPP_DigestUpdate(ctx, req_info->secret, strlen(req_info->secret))) { - return 0; + if (PPP_DigestUpdate(ctx, vp->strvalue, 16)) { + + buflen = MD5_DIGEST_LENGTH; + if (PPP_DigestFinal(ctx, buf, &buflen)) { + + status = 1; + } + } + } + } + PPP_MD_CTX_free(ctx); + } + + if (status) { + + for(i = 0; i < MD5_DIGEST_LENGTH; i++) { + plain[i + 16] ^= buf[i]; + } + + /* + * Annoying. The "key" returned is just the NTPasswordHashHash, which + * the NAS (us) doesn't need; we only need the start key. So we have + * to generate the start key, sigh. NB: We do not support the LM-Key. + */ + mppe_set_chapv1(challenge, &plain[8]); + return 0; + } + } + + return -1; } /********************************************************************** @@ -825,11 +871,13 @@ static int radius_setmppekeys2(VALUE_PAIR *vp, REQUEST_INFO *req_info) { int i; - MD5_CTX Context; - u_char *salt = vp->strvalue; - u_char *crypt = vp->strvalue + 2; - u_char plain[32]; - u_char buf[MD5_HASH_SIZE]; + int status = 0; + PPP_MD_CTX *ctx; + unsigned char *salt = vp->strvalue; + unsigned char *crypt = vp->strvalue + 2; + unsigned char plain[32]; + unsigned char buf[MD5_DIGEST_LENGTH]; + unsigned int buflen; char *type = "Send"; if (vp->attribute == PW_MS_MPPE_RECV_KEY) @@ -848,34 +896,81 @@ radius_setmppekeys2(VALUE_PAIR *vp, REQUEST_INFO *req_info) memcpy(plain, crypt, 32); - MD5_Init(&Context); - MD5_Update(&Context, req_info->secret, strlen(req_info->secret)); - MD5_Update(&Context, req_info->request_vector, AUTH_VECTOR_LEN); - MD5_Update(&Context, salt, 2); - MD5_Final(buf, &Context); + ctx = PPP_MD_CTX_new(); + if (ctx) { - for (i = 0; i < 16; i++) - plain[i] ^= buf[i]; + if (PPP_DigestInit(ctx, PPP_md5())) { - if (plain[0] != 16) { - error("RADIUS: Incorrect key length (%d) for MS-MPPE-%s-Key attribute", - (int) plain[0], type); - return -1; + if (PPP_DigestUpdate(ctx, req_info->secret, strlen(req_info->secret))) { + + if (PPP_DigestUpdate(ctx, req_info->request_vector, AUTH_VECTOR_LEN)) { + + if (PPP_DigestUpdate(ctx, salt, 2)) { + + buflen = sizeof(buf); + if (PPP_DigestFinal(ctx, buf, &buflen)) { + + status = 1; + } + } + } + } + } + + PPP_MD_CTX_free(ctx); } - MD5_Init(&Context); - MD5_Update(&Context, req_info->secret, strlen(req_info->secret)); - MD5_Update(&Context, crypt, 16); - MD5_Final(buf, &Context); + if (status) { - plain[16] ^= buf[0]; /* only need the first byte */ + for (i = 0; i < 16; i++) { + plain[i] ^= buf[i]; + } - if (vp->attribute == PW_MS_MPPE_SEND_KEY) - mppe_set_keys(plain + 1, NULL, 16); - else - mppe_set_keys(NULL, plain + 1, 16); + if (plain[0] != 16) { + error("RADIUS: Incorrect key length (%d) for MS-MPPE-%s-Key attribute", + (int) plain[0], type); + return -1; + } - return 0; + status = 0; + ctx = PPP_MD_CTX_new(); + if (ctx) { + + if (PPP_DigestInit(ctx, PPP_md5())) { + + if (PPP_DigestUpdate(ctx, req_info->secret, strlen(req_info->secret))) { + + if (PPP_DigestUpdate(ctx, crypt, 16)) { + + if (PPP_DigestUpdate(ctx, salt, 2)) { + + buflen = sizeof(buf); + if (PPP_DigestFinal(ctx, buf, &buflen)) { + + status = 1; + } + } + } + } + } + + PPP_MD_CTX_free(ctx); + } + + if (status) { + + plain[16] ^= buf[0]; /* only need the first byte */ + + if (vp->attribute == PW_MS_MPPE_SEND_KEY) { + mppe_set_keys(plain + 1, NULL, 16); + } else { + mppe_set_keys(NULL, plain + 1, 16); + } + return 0; + } + } + + return -1; } #endif /* PPP_WITH_MPPE */ @@ -896,6 +991,8 @@ radius_acct_start(void) VALUE_PAIR *send = NULL; ipcp_options *ho = &ipcp_hisoptions[0]; u_int32_t hisaddr; + const char *remote_number; + const char *ipparam; if (!rstate.initialized) { return; @@ -923,7 +1020,9 @@ radius_acct_start(void) av_type = PW_PPP; rc_avpair_add(&send, PW_FRAMED_PROTOCOL, &av_type, 0, VENDOR_NONE); - if (*remote_number) { + remote_number = ppp_get_remote_number(); + ipparam = ppp_ipparam(); + if (remote_number) { rc_avpair_add(&send, PW_CALLING_STATION_ID, remote_number, 0, VENDOR_NONE); } else if (ipparam) @@ -933,7 +1032,7 @@ radius_acct_start(void) rc_avpair_add(&send, PW_ACCT_AUTHENTIC, &av_type, 0, VENDOR_NONE); - av_type = ( using_pty ? PW_VIRTUAL : ( sync_serial ? PW_SYNC : PW_ASYNC ) ); + av_type = ( ppp_using_pty() ? PW_VIRTUAL : ( ppp_sync_serial() ? PW_SYNC : PW_ASYNC ) ); rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE); hisaddr = ho->hisaddr; @@ -961,7 +1060,7 @@ radius_acct_start(void) /* Kick off periodic accounting reports */ if (rstate.acct_interim_interval) { - TIMEOUT(radius_acct_interim, NULL, rstate.acct_interim_interval); + ppp_timeout(radius_acct_interim, NULL, rstate.acct_interim_interval, 0); } } @@ -982,13 +1081,16 @@ radius_acct_stop(void) ipcp_options *ho = &ipcp_hisoptions[0]; u_int32_t hisaddr; int result; + const char *remote_number; + const char *ipparam; + ppp_link_stats_st stats; if (!rstate.initialized) { return; } if (rstate.acct_interim_interval) - UNTIMEOUT(radius_acct_interim, NULL); + ppp_untimeout(radius_acct_interim, NULL); rc_avpair_add(&send, PW_ACCT_SESSION_ID, rstate.session_id, 0, VENDOR_NONE); @@ -1011,50 +1113,55 @@ radius_acct_stop(void) av_type = PW_RADIUS; rc_avpair_add(&send, PW_ACCT_AUTHENTIC, &av_type, 0, VENDOR_NONE); + if (ppp_get_link_stats(&stats)) { - if (link_stats_valid) { - av_type = link_connect_time; + av_type = ppp_get_link_uptime(); rc_avpair_add(&send, PW_ACCT_SESSION_TIME, &av_type, 0, VENDOR_NONE); - av_type = link_stats.bytes_out & 0xFFFFFFFF; + av_type = stats.bytes_out & 0xFFFFFFFF; rc_avpair_add(&send, PW_ACCT_OUTPUT_OCTETS, &av_type, 0, VENDOR_NONE); - if (link_stats.bytes_out > 0xFFFFFFFF) { - av_type = link_stats.bytes_out >> 32; + if (stats.bytes_out > 0xFFFFFFFF) { + av_type = stats.bytes_out >> 32; rc_avpair_add(&send, PW_ACCT_OUTPUT_GIGAWORDS, &av_type, 0, VENDOR_NONE); } - av_type = link_stats.bytes_in & 0xFFFFFFFF; + av_type = stats.bytes_in & 0xFFFFFFFF; rc_avpair_add(&send, PW_ACCT_INPUT_OCTETS, &av_type, 0, VENDOR_NONE); - if (link_stats.bytes_in > 0xFFFFFFFF) { - av_type = link_stats.bytes_in >> 32; + if (stats.bytes_in > 0xFFFFFFFF) { + av_type = stats.bytes_in >> 32; rc_avpair_add(&send, PW_ACCT_INPUT_GIGAWORDS, &av_type, 0, VENDOR_NONE); } - av_type = link_stats.pkts_out; + av_type = stats.pkts_out; rc_avpair_add(&send, PW_ACCT_OUTPUT_PACKETS, &av_type, 0, VENDOR_NONE); - av_type = link_stats.pkts_in; + av_type = stats.pkts_in; rc_avpair_add(&send, PW_ACCT_INPUT_PACKETS, &av_type, 0, VENDOR_NONE); } - if (*remote_number) { + remote_number = ppp_get_remote_number(); + ipparam = ppp_ipparam(); + if (remote_number) { rc_avpair_add(&send, PW_CALLING_STATION_ID, remote_number, 0, VENDOR_NONE); } else if (ipparam) rc_avpair_add(&send, PW_CALLING_STATION_ID, ipparam, 0, VENDOR_NONE); - av_type = ( using_pty ? PW_VIRTUAL : ( sync_serial ? PW_SYNC : PW_ASYNC ) ); + av_type = ( ppp_using_pty() ? PW_VIRTUAL : ( ppp_sync_serial() ? PW_SYNC : PW_ASYNC ) ); rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE); av_type = PW_NAS_ERROR; - switch( status ) { + switch( ppp_status() ) { case EXIT_OK: - case EXIT_USER_REQUEST: av_type = PW_USER_REQUEST; break; + case EXIT_USER_REQUEST: + av_type = PW_ADMIN_RESET; + break; + case EXIT_HANGUP: case EXIT_PEER_DEAD: case EXIT_CONNECT_FAILED: @@ -1137,6 +1244,9 @@ radius_acct_interim(void *ignored) ipcp_options *ho = &ipcp_hisoptions[0]; u_int32_t hisaddr; int result; + const char *remote_number; + const char *ipparam; + ppp_link_stats_st stats; if (!rstate.initialized) { return; @@ -1163,45 +1273,43 @@ radius_acct_interim(void *ignored) av_type = PW_RADIUS; rc_avpair_add(&send, PW_ACCT_AUTHENTIC, &av_type, 0, VENDOR_NONE); - /* Update link stats */ - update_link_stats(0); - - if (link_stats_valid) { - link_stats_valid = 0; /* Force later code to update */ + if (ppp_get_link_stats(&stats)) { - av_type = link_connect_time; + av_type = ppp_get_link_uptime(); rc_avpair_add(&send, PW_ACCT_SESSION_TIME, &av_type, 0, VENDOR_NONE); - av_type = link_stats.bytes_out & 0xFFFFFFFF; + av_type = stats.bytes_out & 0xFFFFFFFF; rc_avpair_add(&send, PW_ACCT_OUTPUT_OCTETS, &av_type, 0, VENDOR_NONE); - if (link_stats.bytes_out > 0xFFFFFFFF) { - av_type = link_stats.bytes_out >> 32; + if (stats.bytes_out > 0xFFFFFFFF) { + av_type = stats.bytes_out >> 32; rc_avpair_add(&send, PW_ACCT_OUTPUT_GIGAWORDS, &av_type, 0, VENDOR_NONE); } - av_type = link_stats.bytes_in & 0xFFFFFFFF; + av_type = stats.bytes_in & 0xFFFFFFFF; rc_avpair_add(&send, PW_ACCT_INPUT_OCTETS, &av_type, 0, VENDOR_NONE); - if (link_stats.bytes_in > 0xFFFFFFFF) { - av_type = link_stats.bytes_in >> 32; + if (stats.bytes_in > 0xFFFFFFFF) { + av_type = stats.bytes_in >> 32; rc_avpair_add(&send, PW_ACCT_INPUT_GIGAWORDS, &av_type, 0, VENDOR_NONE); } - av_type = link_stats.pkts_out; + av_type = stats.pkts_out; rc_avpair_add(&send, PW_ACCT_OUTPUT_PACKETS, &av_type, 0, VENDOR_NONE); - av_type = link_stats.pkts_in; + av_type = stats.pkts_in; rc_avpair_add(&send, PW_ACCT_INPUT_PACKETS, &av_type, 0, VENDOR_NONE); } - if (*remote_number) { + remote_number = ppp_get_remote_number(); + ipparam = ppp_ipparam(); + if (remote_number) { rc_avpair_add(&send, PW_CALLING_STATION_ID, remote_number, 0, VENDOR_NONE); } else if (ipparam) rc_avpair_add(&send, PW_CALLING_STATION_ID, ipparam, 0, VENDOR_NONE); - av_type = ( using_pty ? PW_VIRTUAL : ( sync_serial ? PW_SYNC : PW_ASYNC ) ); + av_type = ( ppp_using_pty() ? PW_VIRTUAL : ( ppp_sync_serial() ? PW_SYNC : PW_ASYNC ) ); rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE); hisaddr = ho->hisaddr; @@ -1227,7 +1335,7 @@ radius_acct_interim(void *ignored) rc_avpair_free(send); /* Schedule another one */ - TIMEOUT(radius_acct_interim, NULL, rstate.acct_interim_interval); + ppp_timeout(radius_acct_interim, NULL, rstate.acct_interim_interval, 0); } /********************************************************************** @@ -1324,7 +1432,7 @@ radius_init(char *msg) * Extracts the port number from the interface name ***********************************************************************/ static int -get_client_port(char *ifname) +get_client_port(const char *ifname) { int port; if (sscanf(ifname, "ppp%d", &port) == 1) {