Sylvain_Goulmy
Apr 18, 2020Altostratus
Set the same iRule on TCP and UDP VS
Hi all,
I have written an iRule that i'd like to deploy both on TCP and UDP VS.
To achieve that i have something in my code like :
set protocol [IP::protocol]
set dest_port [expr { $protocol == 6 ? [TCP::local_port] : [UDP::local_port] }]
When i put this iRule on my TCP VS with a standard type, i have the following error :
UDP::remote_port in rule (/Common/mitigate_scans) requires an associated BIGPROTO or UDP profile on the virtual-server
But if i switch my TCP VS to a FastL4 type then the error doesn't raise anymore and it works as expected.
Here are my questions :
- Why is there a difference linked to the type of my VS ? Why can i deploy this iRule on a FastL4 type ?
- Is there any code trick that would allow me to deploy the same code both on UDP and TCP VS with a standard type ?
Thanks in advance for your feedback.
Sylvain