Hi Bogdan et al.,
(I already spoke to bogdan about this about a month ago, and he could reproduce it. I'm filing it now lest I forget.)
The call to t_newtran() causes an early call to init_rb() from tm whichs calls update_sock_struct_from_ip() whichs checks the FL_FORCE_RPORT flag and sets the reply destination port. Ergo, when t_newtran() is called before force_rport(), the response dport is not set to the request sport.
Headers are adjusted properly however:
REGISTER ... Via ... 5061;rport <-- good, response to sport
REGISTER ... Via ...:5061 <-- good, response to 5061
REGISTER ... Via ...:5061 and then a force_rport <-- bad, response to 5061 instead of sport
Steps to reproduce:
If the Via doesn't have an rport, the t_newtran causes the reply to go to the via-port instead of the source port.
Log in to post a comment.