<p>Neels Hofmeyr <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/10676">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">generate shorter 'I:' conn IDs<br><br>Reduce the number of hex chars generated as Connection Identifier from 32 to 8.<br><br>According to RFC3435 2.1.3.2 "Names of Connections", the maximum length is<br>indeed 32 characters, but there isn't really a benefit of using IDs of that<br>size. That, and:<br><br>A specific SCCPlite MSC is seen to be able to store conn IDs of up to 8 hex<br>characters of length. If given more than that, it will later send 'ffffffff' as<br>ID, e.g. in the DLCX message, causing mismatches and rejected DLCX.<br><br>Conn IDs need to be unique only within the context of one endpoint, so<br>producing 32 characters of ID is far beyond overkill, especially if we<br>currently expect exactly two IDs per endpoint.<br><br>Notice that the maximum length of conn ID that can be handled by the message<br>parsing and composition doesn't change, only the length that an osmo-mgw will<br>generate upon CRCX does.<br><br>Related: OS#3507<br>Change-Id: Ia290c22a91fca0e5aa44515fca6df00064aff100<br>---<br>M src/libosmo-mgcp/mgcp_conn.c<br>1 file changed, 2 insertions(+), 1 deletion(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libosmo-mgcp/mgcp_conn.c b/src/libosmo-mgcp/mgcp_conn.c</span><br><span>index 2a45b81..0126c7c 100644</span><br><span>--- a/src/libosmo-mgcp/mgcp_conn.c</span><br><span>+++ b/src/libosmo-mgcp/mgcp_conn.c</span><br><span>@@ -55,10 +55,11 @@</span><br><span>  * memory for id) */</span><br><span> static int mgcp_alloc_id(struct mgcp_endpoint *endp, char *id)</span><br><span> {</span><br><span style="color: hsl(120, 100%, 40%);">+#define MGCP_CONN_ID_GEN_LEN 8</span><br><span>   int i;</span><br><span>       int k;</span><br><span>       int rc;</span><br><span style="color: hsl(0, 100%, 40%);">- uint8_t id_bin[16];</span><br><span style="color: hsl(120, 100%, 40%);">+   uint8_t id_bin[MGCP_CONN_ID_GEN_LEN / 2];</span><br><span>    char *id_hex;</span><br><span> </span><br><span>    /* Generate a connection id that is unique for the current endpoint.</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10676">change 10676</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.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.osmocom.org/10676"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ia290c22a91fca0e5aa44515fca6df00064aff100 </div>
<div style="display:none"> Gerrit-Change-Number: 10676 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>