Weird behaviour (caused by weird irule? :))
Hi guys,
I'm trying something on v11.2.1-HF4 and I found a weird thing. Here are the steps to reproduce it:
1) create a standard virtual server with a TCP profile.
2) link the following irule:
Rule INIT
when RULE_INIT {
set static::log_verbosity 1
set static::log_prefix ""
set ::base_protocol "UDP"
log local0. "Base Protocol: $::base_protocol"
}
All Client Request events
Connection stuff
when CLIENT_ACCEPTED {
set source_port_construct "\[${::base_protocol}::remote_port\]"
set destination_port_construct "\[${::base_protocol}::local_port\]"
eval "set source_port $source_port_construct"
eval "set destination_port $destination_port_construct"
log local0. "Source Port: $source_port ($source_port_construct)"
log local0. "Destination Port: $destination_port ($destination_port_construct)"
}
3) Observe the source and destination ports being filled out even though the information comes from UDP::local_port and UDP::remote_port. Remember: you don't have a UDP profile, and the editor correctly tells you that you need one when you try to reference these values directly, but through an eval statement it is possible. The problem is: where is it getting its info from??? There isn't even a UDP profile added to the virtual, yet the connection details are retrieved correctly.... for the TCP connection... with the UDP:: statements...
4) Tell me why this happens - I think I'm missing something here.
Kind regards,
Thomas