Forum Discussion
Rise_77519
Nov 30, 2011Nimbostratus
irule with diameter result code
Hi ,
I need an irule for diameter service that is based on resuld codes in AVP 286 code.AVP 286 code also includes some result codes (exmp. 2001 DIAMEMETER_SUCCESS) . I would like to take ...
Rise_77519
Dec 22, 2011Nimbostratus
Hi Nitass,
the irule is as below.I also removed the 280- 282{} default lines and replaced with 272 comcode but not changed anything.
Thank you again.
when SERVER_DATA {
while {[TCP::payload length] > 20} {
binary scan [TCP::payload] II a b
set comcode [expr {$b & 0xffffff}]
set mlen [expr {$a & 0xffffff}]
set rflag [expr {($b >> 31) & 1}]
if {!($rflag)} {
switch $comcode {
280 -
282 {}
default {
set index 20
while {$index < $mlen} {
binary scan [TCP::payload $mlen] @${index}II avp_code avp_len
set avp_len [expr {$avp_len & 0xffffff}]
set avp_len_pad [expr {(($avp_len + 3)/4)*4}]
if {$avp_code == 268} {
set avp_dlen [expr {$avp_len - 8}]
binary scan [TCP::payload $mlen] @[expr {$index + 8}]I result
break
}
incr index $avp_len_pad
}
}
}
switch $result {
5012 { log local0. "5012" }
default { log local0. "others" }
}
}
TCP::release $mlen
}
TCP::collect
}
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