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

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

Re: [Help-gnu-radius] Rewrite rule no good - need variable with public I


From: Sergey Poznyakoff
Subject: Re: [Help-gnu-radius] Rewrite rule no good - need variable with public IP
Date: Mon, 15 Mar 2004 11:46:51 +0200

Morten Winther <address@hidden> wrote:

> But when I use %C{NAS-IP-Address} in sqlserver no IP shows up in the
> db which is obvious since I removed it with a rewrite rule. I had
> hoped it would use the source IP from the UPD packet as it does with
> log-files.
> 
> What can I do?

For the time being, apply the following patch:

Index: radiusd/radutil.c
--- ../orig/radius-1.2/radiusd/radutil.c        Sat Nov  8 14:09:17 2003
+++ radiusd/radutil.c   Mon Mar 15 11:33:34 2004
@@ -142,8 +142,14 @@ attr_to_str(struct obstack *obp, RADIUS_
                         break;
                 }
                 
-                if (!pair)
-                        return;
+                if (!pair) {
+                       if (attr->value == DA_NAS_IP_ADDRESS) {
+                               ip_iptostr(req->ipaddr, tmp);
+                               len = strlen(tmp);
+                               obstack_grow(obp, tmp, len);
+                       } 
+                       return;
+               }
         } else if (defval && *defval == '+') {
                 defval++;
                 len = strlen(defval);

I'll try to find a better solution later.                
 
Regards,
Sergey




reply via email to

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