<p style="white-space: pre-wrap; word-wrap: break-word;">I was the one to send you on this journey, and I appreciate this solution.</p><p style="white-space: pre-wrap; word-wrap: break-word;">My conclusion however from what you found is that we currently don't support BLOB addresses properly, especially since you told me that some places store the address as a nul-terminated string pointer without length.</p><p style="white-space: pre-wrap; word-wrap: break-word;">If we want true BLOB support at some point in the future, nipping off the last byte is a new future quirk. Say we fixed all other places, then we might still need to keep this for legacy compat ...</p><p style="white-space: pre-wrap; word-wrap: break-word;">I am not fully decided which way to go, but I lean towards: now always send the terminating nul from GSUP clients as contained in destination addresses (counted in the addr_len), i.e. we contain the nul in the BLOB, but the code should ignore that fact as much as currently possible -- towards a future where no code depends on the nul.</p><p style="white-space: pre-wrap; word-wrap: break-word;">If we end up accepting this patch instead, then the following review applies...</p><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/1//COMMIT_MSG">Commit Message:</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/1//COMMIT_MSG@15">Patch Set #1, Line 15:</a> <code style="font-family:monospace,monospace">destination name blobs to gsup_route_find().</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">add "from incoming GSUP messages' destination_name IEs"</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13048/1/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/1/src/gsup_router.c@42">Patch Set #1, Line 42:</a> <code style="font-family:monospace,monospace">    llist_for_each_entry(gr, &gs->routes, list) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">An elaborate comment here would be nice, maybe</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">   /* gr->addr should be treated as a BLOB, yet for historical reasons may be assumed to be a nul-terminated<br>      string where the nul is not considered part of the address, especially in incoming GSUP messages.<br>      Hence, for incoming addr that are not nul-terminated, also compare without the nul. */</pre></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13048/1/src/gsup_router.c@50">Patch Set #1, Line 50:</a> <code style="font-family:monospace,monospace">         if (gr_addrlen - 1 == addrlen && !memcmp(gr->addr, addr, addrlen))</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">&& addr[addrlen - 1] != '\0' && gr-addr[gr_addrlen - 1] == '\0'</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: 1 </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-Comment-Date: Tue, 26 Feb 2019 13:43:58 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>