Redundant SQL

Garber, Neal Neal.Garber at energyeast.com
Mon Sep 21 14:46:23 CEST 2009


> Source code patched.

Thanks..

> The redundant sections work just fine
> for normal queries to radcheck && radreply.  If you're doing %{...},
> then the redundant sections don't apply.

Ah, now I understand.  I abandoned redundant and used if/elsif instead in my dynamic_client virtual server:

  if ("%{sqlaugs: SELECT ...}'}") {
     update control {
        FreeRADIUS-Client-IP-Address = "%{Packet-Src-IP-Address}"
        FreeRADIUS-Client-Shortname = "%{sqlaugs: SELECT ...}'}"
        FreeRADIUS-Client-Secret = "%{sqlaugs: SELECT ...}'}"
        FreeRADIUS-Client-NAS-Type = "%{sqlaugs: SELECT ...}'}"
     }
  }
  elsif ("%{sqlroch: SELECT ...}'}") {
     update control {
        FreeRADIUS-Client-IP-Address = "%{Packet-Src-IP-Address}"
        FreeRADIUS-Client-Shortname = "%{sqlroch: SELECT ...}'}"
        FreeRADIUS-Client-Secret = "%{sqlroch: SELECT ...}'}"
        FreeRADIUS-Client-NAS-Type = "%{sqlroch: SELECT ...}'}"
     }
  }

This works great.  Thanks again for your help Alan..




More information about the Freeradius-Users mailing list