ACK not sent using an existing TLS transport #3783
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Scenario
Analysis
The dialog will store the remote name in
dlg->intial_dest
in step 1 (see #3310) bydlg_update_routeset()
:pjproject/pjsip/src/pjsip/sip_dialog.c
Lines 1876 to 1881 in c224f26
And in step 4, the remote name is supposed to be updated/reset by the same code above, but it does not happen as the transport used by 200 response is a server transport. So in sending the ACK in step 5, the transport manager won't find/reuse the transport created in step 3 because it is being requested for remote address in step 3 but with wrong/old remote name (set by step 1). Note that a TLS transport can be reused if it matches both: remote address and remote name (for TLS verification).
Resetting the dialog's remote name should be sufficient because later it will be initialized to the target address by
pjsip_endpt_send_request_stateless()
(orpjsip_endpt_send_response()
if it is a response).Thanks to Peter Koletzki for the report.