Still won't work without the changes hoolio recommended.
Even then, your iRule either isn't necessary or else it won't accomplish your goal.
It's not necessary if the application server opens and uses a single TCP connection: Packets from that connection will already always be sent to the same pool member.
Or else it won't accomplish the goal: If the client opens multiple TCP connections that all need to go to the same server, the source port will change for each new connection. Since you're including the port in your persistence key, when it changes, your iRule will not be able to associate a new connection from the same client with the old persistence record.Our call flow:
Client 1 ---> opens TCP connection with F5 ---> Round Robbing between sever 1 and server 2.If you're seeing transactions from the same client on different servers, that means the client is opening up more than one TCP connection, and you'll need to persist on source address only or find another persistence token to use.
You might want to just try the built-in source address persistence and see if that works for you.
HTH
/deb