aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_msc.c4
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_nat.c6
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_ussd.c6
-rw-r--r--openbsc/tests/vty_test_runner.py6
4 files changed, 10 insertions, 12 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_msc.c b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
index b179ff17f..badecc682 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_msc.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_msc.c
@@ -456,9 +456,7 @@ static int answer_challenge(struct bsc_msc_data *data, struct msgb *inp, struct
.algo = OSMO_AUTH_ALG_MILENAGE,
};
- ret = ipa_ccm_idtag_parse_off(&tvp,
- inp->l2h + 1,
- msgb_l2len(inp) - 1, 1);
+ ret = ipa_ccm_id_get_parse(&tvp, inp->l2h + 1, msgb_l2len(inp) - 1);
if (ret < 0) {
LOGP(DMSC, LOGL_ERROR, "ignoring IPA response "
"message with malformed TLVs: %s\n", osmo_hexdump(inp->l2h + 1,
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat.c b/openbsc/src/osmo-bsc_nat/bsc_nat.c
index c8a9e74e9..670b0be0c 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat.c
@@ -1291,9 +1291,9 @@ exit:
if (msg->l2h[0] == IPAC_MSGT_ID_RESP && msgb_l2len(msg) > 2) {
struct tlv_parsed tvp;
int ret;
- ret = ipa_ccm_idtag_parse_off(&tvp,
- (unsigned char *) msg->l2h + 2,
- msgb_l2len(msg) - 2, 0);
+ ret = ipa_ccm_id_resp_parse(&tvp,
+ (unsigned char *) msg->l2h + 1,
+ msgb_l2len(msg) - 1);
if (ret < 0) {
LOGP(DNAT, LOGL_ERROR, "ignoring IPA response "
"message with malformed TLVs\n");
diff --git a/openbsc/src/osmo-bsc_nat/bsc_ussd.c b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
index ee0b08593..dea18073f 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_ussd.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_ussd.c
@@ -141,9 +141,9 @@ static int ussd_read_cb(struct osmo_fd *bfd)
if (msg->l2h[0] == IPAC_MSGT_ID_RESP) {
struct tlv_parsed tvp;
int ret;
- ret = ipa_ccm_idtag_parse(&tvp,
- (unsigned char *) msg->l2h + 2,
- msgb_l2len(msg) - 2);
+ ret = ipa_ccm_id_resp_parse(&tvp,
+ (unsigned char *) msg->l2h + 1,
+ msgb_l2len(msg) - 1);
if (ret < 0) {
LOGP(DNAT, LOGL_ERROR, "ignoring IPA response "
"message with malformed TLVs\n");
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index 5afcd2ebd..ca0b8794a 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -922,8 +922,8 @@ class TestVTYNAT(TestVTYGenericBSC):
self.assertEqual(data, "\x00\x01\xfe\x04")
print "Going to send ID_RESP response"
- res = ussdSocket.send(IPA().id_resp(IPA().tag_name('key')))
- self.assertEqual(res, 10)
+ res = ussdSocket.send(IPA().id_resp(IPA().tag_name('key'+'\0')))
+ self.assertEqual(res, 11)
# initiating PING/PONG cycle to know, that the ID_RESP message has been processed
@@ -1072,7 +1072,7 @@ def ipa_handle_resp(x, tk, verbose = False, proc=None):
while True:
print "\tsending IPA identity(%s) at %s" % (tk, time.strftime("%T"))
try:
- x.send(IPA().id_resp(IPA().identity(name = tk.encode('utf-8'))))
+ x.send(IPA().id_resp(IPA().identity(name = (tk+'\0').encode('utf-8'))))
print "\tdone sending IPA identity(%s) at %s" % (tk,
time.strftime("%T"))
break