Forum Discussion
serge_faller_83
Altostratus
Oct 19, 2005Add a new data on the UDP payload
Hi,
I wish to find a way with an iRule to save a src_adress (client) at the end of the
UDP payload before SNAT. ( use RADIUS )
I implemented the irules according to :
. Update the end of payload with this adress : UDP::payload replace
-> failure
. Update UDP length and IP length, and chck=0 : ?
how can I replace length UDP, IP and checksum ( no IP::length, IP::chck)
thanks for the help
irules :
-------
set udp_size [UDP::payload length]
set size_IP 4
set Ip_src_adr [IP::client_addr]
update length and checksum
set [UDP::payload length] [ expr $size_IP + $size_IP ]
-> no update
save @IP
UDP::payload replace $udp_size $size_IP $Ip_src_adr
-> it doesn't work - failure
- drteeth_127330Historic F5 AccountThe UDP::payload replace command will automatically update the datagram length and checksum. The command syntax is as follows:
UDP::payload replace
when CLIENT_DATA { UDP::payload replace 0 0 [IP::remote_addr] }
- unRuleY_95363Historic F5 AccountJust to add to Dr. Teeth's post. You problem is that:
UDP::payload replace $udp_size 0 $Ip_src_adr
- serge_faller_83
Altostratus
thanks for your help, - unRuleY_95363Historic F5 AccountYou would likely need to use the regular scan and some math:
scan [IP::client_addr] "%u.%u.%u.%u" ip1 ip2 ip3 ip4 set ip [expr {(ip1 << 24) + (ip2 << 16) + (ip3 << 😎 + ip4}]
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