rlm_perl and accounting
Alan DeKok
aland at deployingradius.com
Wed Aug 23 00:01:12 CEST 2006
Justin Church <jcc at unc.edu> wrote:
> I see the patch you're referring to, but after rethinking my question, I
> think what I'm really trying to do is rewrite $RAD_REQUEST, not
> $RAD_REPLY, and it does not appear that I can alter $RAD_REQUEST in any
> way - either change or add.
Yeah, I just ran into this today, too. I think it's useful to be
able to modify RAD_REQUEST. The patch included below should help.
Unless there are serious objections, I'll add it to 1.1.3, too.
Alan DeKok.
--
http://deployingradius.com - The web site of the book
http://deployingradius.com/blog/ - The blog
Index: src/modules/rlm_perl/rlm_perl.c
===================================================================
RCS file: /source/radiusd/src/modules/rlm_perl/rlm_perl.c,v
retrieving revision 1.13.4.7
diff -u -r1.13.4.7 rlm_perl.c
--- src/modules/rlm_perl/rlm_perl.c 27 Apr 2006 17:35:44 -0000 1.13.4.7
+++ src/modules/rlm_perl/rlm_perl.c 22 Aug 2006 22:08:00 -0000
@@ -1050,6 +1050,11 @@
LEAVE;
+ if ((get_hv_content(rad_request_hv, &vp)) > 0 ) {
+ pairmove(&request->packet->vps, &vp);
+ pairfree(&vp);
+ }
+
if ((get_hv_content(rad_reply_hv, &vp)) > 0 ) {
pairmove(&request->reply->vps, &vp);
pairfree(&vp);
@@ -1060,6 +1065,12 @@
pairfree(&vp);
}
+ if ((get_hv_content(rad_request_proxy_hv, &vp)) > 0 && request->proxy != NULL) {
+ pairfree(&request->proxy->vps);
+ pairmove(&request->proxy->vps, &vp);
+ pairfree(&vp);
+ }
+
if ((get_hv_content(rad_request_proxy_reply_hv, &vp)) > 0 && request->proxy_reply != NULL) {
pairfree(&request->proxy_reply->vps);
pairmove(&request->proxy_reply->vps, &vp);
More information about the Freeradius-Users
mailing list