<p><a href="https://gerrit.osmocom.org/13048">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13048/2/src/gsup_router.c">File src/gsup_router.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13048/2/src/gsup_router.c@43">Patch Set #2, Line 43:</a> <code style="font-family:monospace,monospace">talloc_total_size</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">You could alternatively extend struct 'gsup_route' with 'addr_len', and modify gsup_route_add() to store the address length there. Calling talloc_total_size() comes at a higher price...</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13048/2/src/gsup_router.c@45">Patch Set #2, Line 45:</a> <code style="font-family:monospace,monospace">a lot of code assumes that addr is also nul-terminated</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Wait, your previous comment also states that "gr->addr is a nul-terminated string" o_O.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13048/2/src/gsup_router.c@49">Patch Set #2, Line 49:</a> <code style="font-family:monospace,monospace">Compare addr as non-nul-terminated blob</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Wouldn't this cause a collision when e.g. both (read in hex):</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  - 0xff, 0x00, 0x00, 0xbb, 0xaa, 0xff,<br>  - 0xff, 0x00, 0x00, 0xbb, 0xaa, 0x77,</pre><p style="white-space: pre-wrap; word-wrap: break-word;">are considered as equal?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13048">change 13048</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/13048"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-hlr </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I01a45900e14d41bcd338f50ad85d9fabf2c61405 </div>
<div style="display:none"> Gerrit-Change-Number: 13048 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: osmith <osmith@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>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 02 Apr 2019 07:05:27 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>