Forum Discussion
Ibrahim_Kadiri
Nimbostratus
Jun 12, 2017Irule for TCP DATA verification
Hi Experts,
I have created the below iRule, Kindly can you please suggest to tune it.
I am looking for three conditions to match in a connection to allow the user. For Eg: The Client ID (TID) should be Equal to Serial Number (TSN) and its MAC (MAC)
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
set payload [TCP::payload]
regexp {} payload TID
regexp {} payload TSN
set TSN "$TSN,"
set MAC LINK::lasthop
concatenate the two variables
set total "$TSN$MAC"
set value [class match -name $TID equals string_Data_group ]
if {$value ne $total}{
reject
}
}
Thanks,
Ibrahim
1 Reply
- Stanislas_Piro2
Cumulonimbus
Hi,
The main problem in your irule is the regexp command twice of all payload data for any TCP .
What is the regexp pattern? this seems empty. can you search pattern without regex (string with fixed length, encoded string length in headers, ...)?
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