<p>Harald Welte has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/10298">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Migrate from osmo_ipa_idtag_parse() to ipa_ccm_id_resp_parse()<br><br>In libosmocore Change-ID I1834d90fbcdbfcb05f5b8cfe39bfe9543737ef8f<br>we have introduced ipa_ccm_id_resp_parse() as a bugfixed replacement<br>of ipa_ccm_idtag_parse().<br><br>The main difference is that the returned "value" parts now have<br>a correct reported "length", whereas before this commit they all<br>reported a one-byte too-long "length" for each IE.<br><br>Change-Id: Id7f9a69f0921e97865db5720e5bb5e288b2f216b<br>---<br>M openbsc/src/osmo-bsc/osmo_bsc_msc.c<br>M openbsc/src/osmo-bsc_nat/bsc_nat.c<br>2 files changed, 2 insertions(+), 6 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/98/10298/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c</span><br><span>index b179ff1..36273b9 100644</span><br><span>--- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c</span><br><span>+++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c</span><br><span>@@ -456,9 +456,7 @@</span><br><span>            .algo           = OSMO_AUTH_ALG_MILENAGE,</span><br><span>    };</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-  ret = ipa_ccm_idtag_parse_off(&tvp,</span><br><span style="color: hsl(0, 100%, 40%);">-                         inp->l2h + 1,</span><br><span style="color: hsl(0, 100%, 40%);">-                                msgb_l2len(inp) - 1, 1);</span><br><span style="color: hsl(120, 100%, 40%);">+      ret = ipa_ccm_id_get_parse(&tvp, inp->l2h+1, msgb_l2len(inp)-1);</span><br><span>      if (ret < 0) {</span><br><span>            LOGP(DMSC, LOGL_ERROR, "ignoring IPA response "</span><br><span>                    "message with malformed TLVs: %s\n", osmo_hexdump(inp->l2h + 1,</span><br><span>diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c</span><br><span>index 0559758..74ae430 100644</span><br><span>--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c</span><br><span>+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c</span><br><span>@@ -1291,9 +1291,7 @@</span><br><span>            if (msg->l2h[0] == IPAC_MSGT_ID_RESP && msgb_l2len(msg) > 2) {</span><br><span>                         struct tlv_parsed tvp;</span><br><span>                       int ret;</span><br><span style="color: hsl(0, 100%, 40%);">-                        ret = ipa_ccm_idtag_parse_off(&tvp,</span><br><span style="color: hsl(0, 100%, 40%);">-                                      (unsigned char *) msg->l2h + 2,</span><br><span style="color: hsl(0, 100%, 40%);">-                                      msgb_l2len(msg) - 2, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+                 ret = ipa_ccm_id_resp_parse(&tvp, (const uint8_t *)msg->l2h+1, msgb_l2len(msg)-1);</span><br><span>                    if (ret < 0) {</span><br><span>                            LOGP(DNAT, LOGL_ERROR, "ignoring IPA response "</span><br><span>                                    "message with malformed TLVs\n");</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/10298">change 10298</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/10298"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: openbsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Id7f9a69f0921e97865db5720e5bb5e288b2f216b </div>
<div style="display:none"> Gerrit-Change-Number: 10298 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Harald Welte <laforge@gnumonks.org> </div>