Forum Discussion
R_Marc
Nimbostratus
Jun 10, 2014Need to access server IP in CLIENT_DATA
I need to make a modification to the TCP::payload with the target IP of the back-end server.
I'm able to make the modifications (when there's one known target server) but I need to do this with a clu...
R_Marc
Nimbostratus
Jun 10, 2014After reading the comments (thanks again) got it working:
when CLIENT_DATA {
log local0. "-"
if { [TCP::payload] contains "(CONNECT_DATA=" } {
set ip_match [regexp -all -inline -indices [IP::local_addr] [TCP::payload]]
foreach instance $ip_match {
set service_start [lindex $instance 0]
set original_tcp_length [TCP::payload length]
TCP::payload replace $service_start 14 [LB::server addr]
TCP::payload replace 0 2 [binary format S1 [TCP::payload length]]
}
}
TCP::release
TCP::collect
}
when LB_SELECTED {
TCP::collect
}
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