Repository navigation
dialog: fix the route set of the automatic PRACK - #4395
Open
thiagosouza84 wants to merge 1 commit into
Open
thiagosouza84 wants to merge 1 commit into
thiagosouza84 wants to merge 1 commit into
Conversation
build_prack_dialog_info() built the PRACK route set from all the Record-Route headers of the reliable 18x, including the proxy's own, and parsed it into td->route_set over a buffer freed before the request was sent. The PRACK went out with a corrupted Route (e.g. "Route: 172.30.50.10.0.10;lr;did=...>") towards the proxy itself. Skip the RRs received with the INVITE and the ones added by the proxy, as push_reply_in_dialog() does for the 2xx, and give td its own copy of the route set. Fixes OpenSIPS#4298.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #4298.
build_prack_dialog_info()(modules/dialog/dlg_req_within.c) had two problems with the PRACK route set:skip_rrs = 0), including the proxy's own. As a result, the PRACK was routed to the proxy itself. The 2xx path (push_reply_in_dialog()) skipsfrom_rr_nb + added_rr.parse_rr_body(rr_set.s, ...)intotd->route_set, whoserr_tentries point intorr_set.s. That buffer ispkg_free()d at the end of the function, before tm prints the request, so the Route went out corrupted (e.g.Route: 172.30.50.10.0.10;lr;did=...>).The fix:
tdits own copy of the route set (duplicate_rr()), whichfree_tm_dlg()releases as before.Tests: OpenSIPS/sipssert-opensips-tests#38 (
dialog/21.prack-uac-auto-rr-in-18x,dialog/22.prack-uac-auto-rr-in-18x-downstream).Local results (arm64 source builds):
6abfdccdialog01–18topology-hiding,record-route