help-gnu-radius
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Help-gnu-radius] %C{Framed-IP-Address} macro fails...


From: Dooley, Ryan
Subject: RE: [Help-gnu-radius] %C{Framed-IP-Address} macro fails...
Date: Thu, 30 Oct 2003 09:51:35 -0600

The dirty hack might be something like this at a glance but I haven't
had time to really look into this and I'm sure this isn't the correct
way, but it seems to me if we delay in sending the accounting to
external sources after it's been sent to the detail log, wouldn't
Framed-IP-Address be set by then?

Cheers,
Ryan

--- begin patch ---

--- acct.c.orig 2003-10-30 09:32:36.000000000 -0600
+++ acct.c      2003-10-30 09:47:31.000000000 -0600
@@ -571,13 +571,24 @@
         }
 #endif
          
-        if (rad_acct_system(radreq, doradwtmp) == 0 &&
-            rad_acct_db(radreq, verified) == 0 &&
-            rad_acct_ext(radreq) == 0) {
+        if (rad_acct_system(radreq, doradwtmp) == 0) {
                 /* Now send back an ACK to the NAS. */
                 radius_send_reply(RT_ACCOUNTING_RESPONSE,
                                radreq, NULL, NULL, activefd);
                 stat_inc(acct, radreq->ipaddr, num_resp);
+
+               /* Do the other methods after we write to the detail
logs and
+                * for now, do not care about the error? */
+                if (rad_acct_db(radreq, verified) != 0) {
+                       fprintf(stderr, "Error with db acct");
+                       return -1;
+               }
+
+               if (rad_acct_ext(radreq) != 0) {
+                       fprintf(stderr, "Error with external acct");
+                       return -1;
+               }
+
                 return 0;
         }

--- end patch ---



> -----Original Message-----
> From: address@hidden
[mailto:help-
> address@hidden On Behalf Of Dooley,
Ryan
> Sent: Thursday, October 30, 2003 9:34 AM
> To: Sergey Poznyakoff
> Cc: address@hidden
> Subject: RE: [Help-gnu-radius] %C{Framed-IP-Address} macro fails...
> 
> I should have replied to the list so every one can see...
> 
> The detail log was the only place the Framed-IP-Address was delivered
> to.  The option that I did find later was to set "aaa accounting
> delay-start" on the NAS (it is a Cisco AS) but the hardware is too old
> to support the version of IOS needed for this option.  So, now the
> question becomes what can be done is software (with in radiusd) to
send
> %C{Framed-IP-Address} or %f to SQL?
> 
> Poking around acct.c in rad_accounting() Could we change:
> 
>         if (rad_acct_system(radreq, doradwtmp) == 0 &&
>             rad_acct_db(radreq, verified) == 0 &&
>             rad_acct_ext(radreq) == 0) {
>                 /* Now send back an ACK to the NAS. */
>                 radius_send_reply(RT_ACCOUNTING_RESPONSE,
>                                radreq, NULL, NULL, activefd);
>                 stat_inc(acct, radreq->ipaddr, num_resp);
>                 return 0;
>         }
> 
> To call rad_acct_db() and rad_acct_ext() later in the process after
> stat_inc()?
> 
> Cheers,
> Ryan
> 
> >
> > In which logs did it appear: detail.auth or detail?
> >
> > Regards,
> > Sergey
> >
> 
> 
> _______________________________________________
> Help-gnu-radius mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/help-gnu-radius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]