From ab3441ca9597769a572205beb4182e621ba35b77 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Mon, 23 Oct 2023 14:42:30 +0200 Subject: [PATCH] MT#58408 pv_headers: don't fallback to Request headers at Replay msg Change-Id: I029fb531522239bb92d5ffb95d23e13feeb42640 (cherry picked from commit 2a57d3ec543bf81182b7811324315915c827fa8b) (cherry picked from commit 0276111198330cb7d828d14c7894312044fe5abf) --- debian/patches/series | 1 + ...vh_xavi_get_child-fix-fallback-logic.patch | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 debian/patches/sipwise/pv_headers-pvh_xavi_get_child-fix-fallback-logic.patch diff --git a/debian/patches/series b/debian/patches/series index 616df7524..3426ebac2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -49,6 +49,7 @@ sipwise/lcr-stopper_mode-parameter.patch sipwise/lcr-stats.patch sipwise/dialog-support-profile_get_size-for-all-profiles.patch sipwise/rtpengine-set-mime-content-length.patch +sipwise/pv_headers-pvh_xavi_get_child-fix-fallback-logic.patch ### active development sipwise/pv_headers-rework-pvh_remove_header_param-take-two.patch sipwise/cfgt-route-log.patch diff --git a/debian/patches/sipwise/pv_headers-pvh_xavi_get_child-fix-fallback-logic.patch b/debian/patches/sipwise/pv_headers-pvh_xavi_get_child-fix-fallback-logic.patch new file mode 100644 index 000000000..6cdfd0527 --- /dev/null +++ b/debian/patches/sipwise/pv_headers-pvh_xavi_get_child-fix-fallback-logic.patch @@ -0,0 +1,22 @@ +From: Victor Seva +Date: Mon, 23 Oct 2023 14:36:49 +0200 +Subject: pv_headers: pvh_xavi_get_child() fix fallback logic + +* don't fallback to Initial request headers for Replies +--- + src/modules/pv_headers/pvh_xavp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/modules/pv_headers/pvh_xavp.c b/src/modules/pv_headers/pvh_xavp.c +index 3bc32d2..bb5f950 100644 +--- a/src/modules/pv_headers/pvh_xavp.c ++++ b/src/modules/pv_headers/pvh_xavp.c +@@ -284,7 +284,7 @@ sr_xavp_t *pvh_xavi_get_child(struct sip_msg *msg, str *xname, str *name) + + pvh_get_branch_xname(msg, xname, &br_xname); + xavi = xavi_get_child(&br_xname, name); +- if(xavi == NULL) { ++ if(xavi == NULL && msg->first_line.type == SIP_REQUEST) { + if(cmp_str(xname, &br_xname) != 0) { + xavi = xavi_get_child(xname, name); + if(xavi) {