Forum Discussion
serge_faller_83
Altostratus
Jun 29, 2005How to read a data in the UDP payload ?
I would like to use an UDP payload information (not header) to target a specific node. I need to read and handle this data (6 octets).
IP message example : Field "01007d" (radius).
...
unRuleY_95363
Jun 29, 2005Historic F5 Account
This should help get you there:
when RULE_INIT {
set ::radius_signature [binary format c3 {1 0 0x7d}]
}
when CLIENT_DATA {
if { [UDP::payload length] > 4 } {
binary scan [UDP::payload] x1c3 radius_stuff
if { $radius_stuff == $::radius_signature } {
node a.b.c.d 123
}
}
}
Disclaimer: I have not tested if this rule even loads.
You will likely also want to enable "datagram lb" so that each udp datagram is re-loadbalanced.
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