Forum Discussion
janholtz
Altostratus
Jul 28, 2010New Radius Profile
Hi all
I am trying to create a simplified alternative -thanks to v10.x changes- to David Wang's super radius irule at:
http://devcentral.f5.com/Tutorials/TechTips/tabid/63/articleType/Articl...
janholtz
Altostratus
Jul 28, 2010No Takers???
Here's an optimised version that uses no variables (so I can enter the optimisation competition one day) :
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
when CLIENT_ACCEPTED {
if { [UDP::payload length] > 4 } {
if {![catch [RADIUS::code]] equals 4 } {
if {[expr 0x[binary scan [RADIUS::avp 40] H*]] == 1} {
if { [expr {[expr 0x[binary format c4 [split [binary scan [RADIUS::avp 8] a*] .]] H8] % 2 }] == 0 } {
pool pool_radius member 1.1.1.1 1813
} else {
pool pool_radius member 1.1.1.2 1813
}
}
}
}
}
when LB_SELECTED {
if { [UDP::payload length] > 4 } {
if {![catch [RADIUS::code]] equals 4 } {
if {[expr 0x[binary scan [RADIUS::avp 40] H*]] == 2} {
persist delete source "[binary scan [RADIUS::avp 8] a*] any virtual"
}
}
}
}
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Regards
Jan
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
