X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fplugins%2Fradius%2Fradius.c;h=5e27ee0b24ac3869331ff9214b71521d9d3bec44;hb=73722c28d461401b93d750a16c6ecc6eb975d58d;hp=53757abcbb1701f0b9952fbe64853b08c4e4b7fe;hpb=dcc1a96716db2df51eb4f593c9e862433298de5c;p=ppp.git diff --git a/pppd/plugins/radius/radius.c b/pppd/plugins/radius/radius.c index 53757ab..5e27ee0 100644 --- a/pppd/plugins/radius/radius.c +++ b/pppd/plugins/radius/radius.c @@ -24,7 +24,7 @@ * ***********************************************************************/ static char const RCSID[] = -"$Id: radius.c,v 1.16 2002/10/01 08:36:49 fcusack Exp $"; +"$Id: radius.c,v 1.18 2002/11/13 18:19:26 fcusack Exp $"; #include "pppd.h" #include "chap.h" @@ -276,7 +276,7 @@ radius_pap_auth(char *user, /* Add user specified vp's */ if (rstate.avp) - rc_avpair_insert(&send, NULL, rstate.avp); + rc_avpair_insert(&send, NULL, rc_avpair_copy(rstate.avp)); if (rstate.authserver) { result = rc_auth_using_server(rstate.authserver, @@ -428,12 +428,16 @@ radius_chap_auth(char *user, break; } #endif + } + if (*remote_number) { + rc_avpair_add(&send, PW_CALLING_STATION_ID, remote_number, 0, + VENDOR_NONE); } /* Add user specified vp's */ if (rstate.avp) - rc_avpair_insert(&send, NULL, rstate.avp); + rc_avpair_insert(&send, NULL, rc_avpair_copy(rstate.avp)); /* * make authentication with RADIUS server @@ -840,7 +844,7 @@ radius_acct_start(void) /* Add user specified vp's */ if (rstate.avp) - rc_avpair_insert(&send, NULL, rstate.avp); + rc_avpair_insert(&send, NULL, rc_avpair_copy(rstate.avp)); if (rstate.acctserver) { result = rc_acct_using_server(rstate.acctserver, @@ -940,7 +944,7 @@ radius_acct_stop(void) /* Add user specified vp's */ if (rstate.avp) - rc_avpair_insert(&send, NULL, rstate.avp); + rc_avpair_insert(&send, NULL, rc_avpair_copy(rstate.avp)); if (rstate.acctserver) { result = rc_acct_using_server(rstate.acctserver, @@ -1036,7 +1040,7 @@ radius_acct_interim(void *ignored) /* Add user specified vp's */ if (rstate.avp) - rc_avpair_insert(&send, NULL, rstate.avp); + rc_avpair_insert(&send, NULL, rc_avpair_copy(rstate.avp)); if (rstate.acctserver) { result = rc_acct_using_server(rstate.acctserver,