<p>Joshua Colp <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/13767">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
Kevin Harwell: Looks good to me, approved
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">pjproject_bundled: Allow brackets in via parameters<br><br>ASTERISK-26955 #close<br>Reported by: Peter Sokolov<br><br>Change-Id: Ib2803640905a77b65d0cee2d0ed2c7b310d470ac<br>---<br>A third-party/pjproject/patches/0040-brackets-in-via-received-params.patch<br>1 file changed, 40 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>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</span><br><span>new file mode 100644</span><br><span>index 0000000..bf96d3d</span><br><span>--- /dev/null</span><br><span>+++ b/third-party/pjproject/patches/0040-brackets-in-via-received-params.patch</span><br><span>@@ -0,0 +1,40 @@</span><br><span style="color: hsl(120, 100%, 40%);">+From 6324760c2fb0ffeb2e29c6c0a96a33906caa8d5f Mon Sep 17 00:00:00 2001</span><br><span style="color: hsl(120, 100%, 40%);">+From: Sean Bright <sean.bright@gmail.com></span><br><span style="color: hsl(120, 100%, 40%);">+Date: Thu, 16 Jan 2020 10:46:11 -0500</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: [PATCH] sip_parser.c: Allow brackets in via parameters</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+From RFC 5118 section 4.5:</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ While it would be beneficial if the same non-terminal</span><br><span style="color: hsl(120, 100%, 40%);">+ ("IPv6reference") was used for both the "sent-by" and "via-received"</span><br><span style="color: hsl(120, 100%, 40%);">+ production rules, there has not been a consensus in the working group</span><br><span style="color: hsl(120, 100%, 40%);">+ to that effect. Thus, the best that can be suggested is that</span><br><span style="color: hsl(120, 100%, 40%);">+ implementations must follow the Robustness Principle [RFC1122] and be</span><br><span style="color: hsl(120, 100%, 40%);">+ liberal in accepting a "received" parameter with or without the</span><br><span style="color: hsl(120, 100%, 40%);">+ delimiting "[" and "]" tokens. When sending a request,</span><br><span style="color: hsl(120, 100%, 40%);">+ implementations must not put the delimiting "[" and "]" tokens.</span><br><span style="color: hsl(120, 100%, 40%);">+---</span><br><span style="color: hsl(120, 100%, 40%);">+ pjsip/src/pjsip/sip_parser.c | 4 ++--</span><br><span style="color: hsl(120, 100%, 40%);">+ 1 file changed, 2 insertions(+), 2 deletions(-)</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+diff --git a/pjsip/src/pjsip/sip_parser.c b/pjsip/src/pjsip/sip_parser.c</span><br><span style="color: hsl(120, 100%, 40%);">+index e01e672fb..4f9c7fca4 100644</span><br><span style="color: hsl(120, 100%, 40%);">+--- a/pjsip/src/pjsip/sip_parser.c</span><br><span>++++ b/pjsip/src/pjsip/sip_parser.c</span><br><span style="color: hsl(120, 100%, 40%);">+@@ -384,11 +384,11 @@ static pj_status_t init_parser()</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ status = pj_cis_dup(&pconst.pjsip_VIA_PARAM_SPEC, &pconst.pjsip_TOKEN_SPEC);</span><br><span style="color: hsl(120, 100%, 40%);">+ PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);</span><br><span style="color: hsl(120, 100%, 40%);">+- pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC, ":");</span><br><span style="color: hsl(120, 100%, 40%);">++ pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC, "[:]");</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ status = pj_cis_dup(&pconst.pjsip_VIA_PARAM_SPEC_ESC, &pconst.pjsip_TOKEN_SPEC_ESC);</span><br><span style="color: hsl(120, 100%, 40%);">+ PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);</span><br><span style="color: hsl(120, 100%, 40%);">+- pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC_ESC, ":");</span><br><span style="color: hsl(120, 100%, 40%);">++ pj_cis_add_str(&pconst.pjsip_VIA_PARAM_SPEC_ESC, "[:]");</span><br><span style="color: hsl(120, 100%, 40%);">+ </span><br><span style="color: hsl(120, 100%, 40%);">+ status = pj_cis_dup(&pconst.pjsip_HOST_SPEC, &pconst.pjsip_ALNUM_SPEC);</span><br><span style="color: hsl(120, 100%, 40%);">+ PJ_ASSERT_RETURN(status == PJ_SUCCESS, status);</span><br><span style="color: hsl(120, 100%, 40%);">+-- </span><br><span style="color: hsl(120, 100%, 40%);">+2.20.1</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/13767">change 13767</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/13767"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ib2803640905a77b65d0cee2d0ed2c7b310d470ac </div>
<div style="display:none"> Gerrit-Change-Number: 13767 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>