If I understood correctly, then out_port will be ignored as msg3 is flow_mod message with ADD command and out_port will be decided by the action port. So, out_port = of_port[1] should not be wrong.

Please correct me, if I am wrong.