pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-cbc/+/28586 )
Change subject: rest_api: Fix cbs.data_user_len not set in 'payload_encoded'
......................................................................
rest_api: Fix cbs.data_user_len not set in 'payload_encoded'
This is later used in cbcmsg_to_cbsp(), but only set for type
'payload_decoded' in parse_payload_decoded().
Change-Id: I519cf300cd01e8c2728babeaa77b8486f47115be
---
M src/rest_api.c
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-cbc refs/changes/86/28586/1
diff --git a/src/rest_api.c b/src/rest_api.c
index a779f3d..e596b77 100644
--- a/src/rest_api.c
+++ b/src/rest_api.c
@@ -317,7 +317,7 @@
if ((jtmp = json_object_get(in, "payload_encoded"))) {
json_t *jpage_arr, *jpage;
- int i, dcs, num_pages;
+ int i, dcs, num_pages, len;
out->is_etws = false;
/* Data Coding Scheme */
@@ -340,6 +340,7 @@
return -EINVAL;
}
out->cbs.num_pages = num_pages;
+ out->cbs.data_user_len = 0;
json_array_foreach(jpage_arr, i, jpage) {
const char *hexstr;
if (!json_is_string(jpage)) {
@@ -351,10 +352,12 @@
*errstr = "'pages' array must contain strings up to 88 hex nibbles";
return -EINVAL;
}
- if (osmo_hexparse(hexstr, out->cbs.data[i], sizeof(out->cbs.data[i])) < 0) {
+ len = osmo_hexparse(hexstr, out->cbs.data[i], sizeof(out->cbs.data[i]));
+ if (len < 0) {
*errstr = "'pages' array must contain hex strings";
return -EINVAL;
}
+ out->cbs.data_user_len += len;
}
return 0;
} else if ((jtmp = json_object_get(in, "payload_decoded"))) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-cbc/+/28586
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-cbc
Gerrit-Branch: master
Gerrit-Change-Id: I519cf300cd01e8c2728babeaa77b8486f47115be
Gerrit-Change-Number: 28586
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newchange
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28585 )
Change subject: Add osmo_ss7 and osmo_gsup as dependencies to .app.src file
......................................................................
Add osmo_ss7 and osmo_gsup as dependencies to .app.src file
We are depending on those applications, so they should be listed.
Change-Id: I4a19439dff362f24efc108ee7b0790b143692d2f
---
M src/osmo_dia2gsup.app.src
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/erlang/osmo_dia2gsup refs/changes/85/28585/1
diff --git a/src/osmo_dia2gsup.app.src b/src/osmo_dia2gsup.app.src
index 514ea59..941573a 100644
--- a/src/osmo_dia2gsup.app.src
+++ b/src/osmo_dia2gsup.app.src
@@ -6,7 +6,9 @@
kernel,
stdlib,
lager,
- diameter
+ diameter,
+ osmo_gsup,
+ osmo_ss7
]},
{mod, {osmo_dia2gsup_app, []}},
{env, []}
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo_dia2gsup/+/28585
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: erlang/osmo_dia2gsup
Gerrit-Branch: master
Gerrit-Change-Id: I4a19439dff362f24efc108ee7b0790b143692d2f
Gerrit-Change-Number: 28585
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange
Attention is currently required from: osmith.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582 )
Change subject: bssap_conn: fix missing length check
......................................................................
Patch Set 2:
(1 comment)
File src/osmo-bsc-nat/bssap_conn.c:
https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582/comment/d77337ca_9b640c33
PS2, Line 60: len = IP_V4_ADDR_LEN;
> see line 74: this function copies all existing IEs except for AOIP_TRASP_ADDR. […]
Ok I see. I think it would be a lot clearer by separating the 2 paths beforehand. gsm0808_enc_aoip_trasp_addr should take care of checking internally whether there's space in msg_new.
if (tag == GSM0808_IE_AOIP_TRASP_ADDR) {
rc = gsm0808_enc_aoip_trasp_addr(msg_new, ss);
} else {
if (len >= msgb_tailroom(msg_new)) {
LOGP(DMAIN, LOGL_ERROR, "Tailroom too small to encode tag %d into copy of bssmap msg\n", tag);
msgb_free(msg_new);
return -EINVAL;
}
rc = tlv_encode_one(msg_new, def->def[tag].type, tag, len, val);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc-nat/+/28582
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc-nat
Gerrit-Branch: master
Gerrit-Change-Id: I1fc4c81e139bab3d7d977ef9467f62d8088884db
Gerrit-Change-Number: 28582
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 12 Jul 2022 14:49:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment