X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fplugins%2Fradius%2Fradius.c;fp=pppd%2Fplugins%2Fradius%2Fradius.c;h=932c89aaec389ec5577d5c01c5afd186321d30e6;hp=e8d794671849fc5e2bd5132759b0704ccd6b94b3;hb=f8583676904957554c5a8bd14ede415688835f6c;hpb=910e26074b507e492c5f31923e0b57c8e4c97db5 diff --git a/pppd/plugins/radius/radius.c b/pppd/plugins/radius/radius.c index e8d7946..932c89a 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.27 2004/11/14 07:26:26 paulus Exp $"; +"$Id: radius.c,v 1.28 2004/11/14 10:27:57 paulus Exp $"; #include "pppd.h" #include "chap-new.h" @@ -284,7 +284,8 @@ radius_pap_auth(char *user, 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); /* Add user specified vp's */ if (rstate.avp) @@ -459,7 +460,8 @@ radius_chap_verify(char *user, char *ourname, int id, 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); /* Add user specified vp's */ if (rstate.avp) @@ -882,7 +884,8 @@ radius_acct_start(void) 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 = PW_RADIUS; rc_avpair_add(&send, PW_ACCT_AUTHENTIC, &av_type, 0, VENDOR_NONE); @@ -986,7 +989,8 @@ radius_acct_stop(void) 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 ) ); rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE); @@ -1129,7 +1133,8 @@ radius_acct_interim(void *ignored) 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 ) ); rc_avpair_add(&send, PW_NAS_PORT_TYPE, &av_type, 0, VENDOR_NONE);