[Asterisk-code-review] pjproject_bundled: Allow brackets in via parameters (asterisk[master])

Joshua Colp asteriskteam at digium.com
Fri Feb 7 07:06:16 CST 2020


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/13767 )

Change subject: pjproject_bundled: Allow brackets in via parameters
......................................................................

pjproject_bundled: Allow brackets in via parameters

ASTERISK-26955 #close
Reported by: Peter Sokolov

Change-Id: Ib2803640905a77b65d0cee2d0ed2c7b310d470ac
---
A third-party/pjproject/patches/0040-brackets-in-via-received-params.patch
1 file changed, 40 insertions(+), 0 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Kevin Harwell: Looks good to me, approved



diff --git a/third-party/pjproject/patches/0040-brackets-in-via-received-params.patch b/third-party/pjproject/patches/0040-brackets-in-via-received-params.patch
new file mode 100644
index 0000000..bf96d3d
--- /dev/null
+++ b/third-party/pjproject/patches/0040-brackets-in-via-received-params.patch
@@ -0,0 +1,40 @@
+From 6324760c2fb0ffeb2e29c6c0a96a33906caa8d5f Mon Sep 17 00:00:00 2001
+From: Sean Bright <sean.bright at gmail.com>
+Date: Thu, 16 Jan 2020 10:46:11 -0500
+Subject: [PATCH] sip_parser.c: Allow brackets in via parameters
+
+From RFC 5118 section 4.5:
+
+  While it would be beneficial if the same non-terminal
+  ("IPv6reference") was used for both the "sent-by" and "via-received"
+  production rules, there has not been a consensus in the working group
+  to that effect.  Thus, the best that can be suggested is that
+  implementations must follow the Robustness Principle [RFC1122] and be
+  liberal in accepting a "received" parameter with or without the
+  delimiting "[" and "]" tokens.  When sending a request,
+  implementations must not put the delimiting "[" and "]" tokens.
+---
+ pjsip/src/pjsip/sip_parser.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/pjsip/src/pjsip/sip_parser.c b/pjsip/src/pjsip/sip_parser.c
+index e01e672fb..4f9c7fca4 100644
+--- a/pjsip/src/pjsip/sip_parser.c
++++ b/pjsip/src/pjsip/sip_parser.c
+@@ -384,11 +384,11 @@ static pj_status_t init_parser()
+ 
+     status = pj_cis_dup(&pconst.pjsip_VIA_PARAM_SPEC, &pconst.pjsip_TOKEN_SPEC);
+     PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+-    pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC, ":");
++    pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC, "[:]");
+ 
+     status = pj_cis_dup(&pconst.pjsip_VIA_PARAM_SPEC_ESC, &pconst.pjsip_TOKEN_SPEC_ESC);
+     PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+-    pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC_ESC, ":");
++    pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC_ESC, "[:]");
+ 
+     status = pj_cis_dup(&pconst.pjsip_HOST_SPEC, &pconst.pjsip_ALNUM_SPEC);
+     PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);
+-- 
+2.20.1
+

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/13767
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: Ib2803640905a77b65d0cee2d0ed2c7b310d470ac
Gerrit-Change-Number: 13767
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200207/db041950/attachment.html>


More information about the asterisk-code-review mailing list