Hi,

 

policy.d/Test

policy_test {

    update reply {

        Framed-IP-Address := 0

        Framed-IP-Netmask := 255.255.255.255

        Cisco-AVPair += 'ip:dns-servers=10.10.10.10 10.10.10.11'

        Cisco-AVPair += 'lcp:interface-config=ip vrf forwarding OBU \nip unnumbered Loopback1'

    }

    if(<ipaddr>0.0.0.0 == &Framed-IP-Address) {

        update reply {

            Reply-Message := 'Some message'

        }

        reject

    }

}

 

I want to check value of the Framed-IP-Address attribute, but it seems the condition if(<ipaddr>0.0.0.0 == &Framed-IP-Address) … does not work. Could you help me.

 

radiusd: FreeRADIUS Version 3.0.5, for host i686-pc-linux-gnu, built on Sep 10 2014 at 06:41:34

Copyright (C) 1999-2014 The FreeRADIUS server project and contributors

There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

PARTICULAR PURPOSE

You may redistribute copies of FreeRADIUS under the terms of the

GNU General Public License

For more information about these matters, see the file named COPYRIGHT

….

Opening new proxy socket 'proxy address * port 0'

Listening on proxy address * port 37055

Ready to process requests

Received Access-Request Id 64 from 127.0.0.1:55574 to 127.0.0.1:1812 length 157

                NAS-Port-Type = Virtual

                CHAP-Password = 0x0143d6783ff7ae79654650a37b8cfb1f9e

                Service-Type = Framed-User

                Called-Station-Id = 'SkyToll.OBU'

                Calling-Station-Id = '421945128228'

                Framed-Protocol = PPP

                CHAP-Challenge = 0xe5da1ef5c27f521eebbc9289ae5c9d34

                User-Name = '231013950043478'

                Connect-Info = '8640000'

                NAS-IP-Address = 10.10.10.10

                NAS-Port = 390

                NAS-Port-Id = 'Uniq-Sess-ID390'

(0) Received Access-Request packet from host 127.0.0.1 port 55574, id=64, length=157

(0)          NAS-Port-Type = Virtual

(0)          CHAP-Password = 0x0143d6783ff7ae79654650a37b8cfb1f9e

(0)          Service-Type = Framed-User

(0)          Called-Station-Id = 'SkyToll.OBU'

(0)          Calling-Station-Id = '421945128228'

(0)          Framed-Protocol = PPP

(0)          CHAP-Challenge = 0xe5da1ef5c27f521eebbc9289ae5c9d34

(0)          User-Name = '231013950043478'

(0)          Connect-Info = '8640000'

(0)          NAS-IP-Address = 10.10.10.10

(0)          NAS-Port = 390

(0)          NAS-Port-Id = 'Uniq-Sess-ID390'

(0) # Executing section authorize from file ./sites-enabled/default

(0)   authorize {

(0)   policy_test policy_test {

(0)    update reply {

(0)          Framed-IP-Address := 0.0.0.0

(0)          Framed-IP-Netmask := 255.255.255.255

(0)          Cisco-AVPair += 'ip:dns-servers=10.10.10.10 10.10.10.11'

(0)          Cisco-AVPair += 'lcp:interface-config=ip vrf forwarding OBU \nip unnumbered Loopback1'

(0)    } # update reply = noop

(0)     if (<ipaddr>0.0.0.0 == &Framed-IP-Address)

(0)     if (<ipaddr>0.0.0.0 == &Framed-IP-Address)  -> FALSE

(0)   } # policy_test policy_test = noop

(0)   [preprocess] = ok

….

 

Peter Balsianok
Voice & Data Services Operation Manager
Orange Slovensko, a.s., ITN Dpt.,
Metodova 8, Bratislava, Slovak Republic

main: +421 908 002405
mobile: +421 905 012405
e-mail: peter.balsianok@orange.com