Change in osmo-sip-connector[master]: Added daemonize feature to osmo-sip-connector
Rafael Diniz has uploaded this change for review. ( https://gerrit.osmocom.org/13704 Change subject: Added daemonize feature to osmo-sip-connector .. Added daemonize feature to osmo-sip-connector Change-Id: I400fb5a2619f348cc60e8c9016154afa60424e66 --- M src/main.c 1 file changed, 16 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/04/13704/1 diff --git a/src/main.c b/src/main.c index 0661498..ab58a52 100644 --- a/src/main.c +++ b/src/main.c @@ -46,6 +46,7 @@ void *tall_mncc_ctx; +static bool daemonize = false; static char *config_file = "osmo-sip-connector.cfg"; static struct log_info_cat mncc_sip_categories[] = { @@ -79,8 +80,9 @@ static void print_help(void) { printf("OsmoSIPcon: MNCC to SIP bridge\n"); - printf(" -h --help\tthis text\n"); + printf(" -h --help\tThis text\n"); printf(" -c --config-file NAME\tThe config file to use [%s]\n", config_file); + printf(" -D --daemonize\tFork the process into a background daemon\n"); printf(" -V --version\tPrint the version number\n"); } @@ -91,11 +93,12 @@ static struct option long_options[] = { {"help", 0, 0, 'h'}, {"config-file", 1, 0, 'c'}, + {"daemonize", 0, 0, 'D'}, {"version", 0, 0, 'V' }, {NULL, 0, 0, 0} }; - c = getopt_long(argc, argv, "hc:V", + c = getopt_long(argc, argv, "hc:DV", long_options, _index); if (c == -1) break; @@ -107,6 +110,9 @@ case 'c': config_file = optarg; break; + case 'D': + daemonize = true; + break; case 'V': print_version(1); exit(EXIT_SUCCESS); @@ -159,6 +165,14 @@ calls_init(); app_setup(_app); + if (daemonize) { + rc = osmo_daemonize(); + if (rc < 0) { + perror("Error during daemonize"); + exit(1); + } + } + /* marry sofia-sip to glib and glib to libosmocore */ loop = g_main_loop_new(NULL, FALSE); g_source_attach(su_glib_root_gsource(g_app.sip.agent.root), -- To view, visit https://gerrit.osmocom.org/13704 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sip-connector Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I400fb5a2619f348cc60e8c9016154afa60424e66 Gerrit-Change-Number: 13704 Gerrit-PatchSet: 1 Gerrit-Owner: Rafael Diniz
Change in osmo-bts[master]: common/oml.c: use proper OML object for Get Attribute Response
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13701 ) Change subject: common/oml.c: use proper OML object for Get Attribute Response .. Patch Set 1: (2 comments) https://gerrit.osmocom.org/#/c/13701/1/src/common/oml.c File src/common/oml.c: https://gerrit.osmocom.org/#/c/13701/1/src/common/oml.c@272 PS1, Line 272: len = handle_attrs_bts(resp, (const struct gsm_bts *) obj, attr, attr_len); If you know it's going to be BTS, then just pass mo->bts and avoid nasty castings. https://gerrit.osmocom.org/#/c/13701/1/src/common/oml.c@275 PS1, Line 275: len = handle_attrs_trx(resp, (const struct gsm_bts_trx *) obj, attr, attr_len); Are yousure this is correct? gsm_objclass2obj returns >bb_transc here, not trx. -- To view, visit https://gerrit.osmocom.org/13701 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Icb1ee75d4bf680deb6365288d8c2053816a12217 Gerrit-Change-Number: 13701 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Jenkins Builder (102) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Thu, 18 Apr 2019 22:48:57 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-gsm-tester[master]: resources.conf.prod: Update config to use new smart socket HW setup
Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13697 ) Change subject: resources.conf.prod: Update config to use new smart socket HW setup .. resources.conf.prod: Update config to use new smart socket HW setup Change-Id: I5cfce927569b6a2d8ca57d3394116bbcff3eee56 --- M example/resources.conf.prod 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Jenkins Builder: Verified Pau Espin Pedrol: Looks good to me, approved diff --git a/example/resources.conf.prod b/example/resources.conf.prod index a65add0..f4e9fe4 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -90,8 +90,8 @@ trx_list: - addr: 10.42.42.120 power_supply: -type: 'sispm' -device: '01:01:4d:98:24' +type: 'intellinet' +device: '10.42.42.250' port: '1' - label: NanoBTS-ONW-900 @@ -102,13 +102,13 @@ trx_list: - addr: 10.42.42.121 power_supply: -type: 'sispm' -device: '01:01:4d:98:24' +type: 'intellinet' +device: '10.42.42.250' port: '2' - addr: 10.42.42.122 power_supply: -type: 'sispm' -device: '01:01:4d:98:24' +type: 'intellinet' +device: '10.42.42.250' port: '3' - label: OsmoBTS Virtual -- To view, visit https://gerrit.osmocom.org/13697 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5cfce927569b6a2d8ca57d3394116bbcff3eee56 Gerrit-Change-Number: 13697 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: roh
Change in osmo-gsm-tester[master]: resources.conf.prod: Update config to use new smart socket HW setup
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13697 ) Change subject: resources.conf.prod: Update config to use new smart socket HW setup .. Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13697 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5cfce927569b6a2d8ca57d3394116bbcff3eee56 Gerrit-Change-Number: 13697 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 18 Apr 2019 22:22:28 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-gsm-tester[master]: resources.conf.prod: Update config to use new smart socket HW setup
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13697 ) Change subject: resources.conf.prod: Update config to use new smart socket HW setup .. Set Ready For Review -- To view, visit https://gerrit.osmocom.org/13697 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I5cfce927569b6a2d8ca57d3394116bbcff3eee56 Gerrit-Change-Number: 13697 Gerrit-PatchSet: 2 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 18 Apr 2019 22:00:42 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in osmo-ci[master]: nightly-packages: Update limesuite hash to support LimeNet-Micro
Pau Espin Pedrol has submitted this change and it was merged. ( https://gerrit.osmocom.org/13696 ) Change subject: nightly-packages: Update limesuite hash to support LimeNet-Micro .. nightly-packages: Update limesuite hash to support LimeNet-Micro Newer LimeSuite (at least 7557e291209fc66a78ffa74dd8314e75841f7c96) is required to have LimeNet-Micro working properly with osmo-trx. We update to current newest master since other fixes related to sample rate are applied after the commit mentioned above. Related: OS#3861 Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1 --- M scripts/osmocom-nightly-packages.sh 1 file changed, 2 insertions(+), 2 deletions(-) Approvals: roh: Looks good to me, approved Harald Welte: Looks good to me, approved Pau Espin Pedrol: Verified diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 61cb250..0d4db2d 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -143,7 +143,7 @@ checkout_limesuite() { cd "$REPO" git clone https://github.com/myriadrf/LimeSuite limesuite - TAG="$(get_last_tag limesuite)" + TAG="357ad5dd0d71304179d476b38e67240527d917df" cd limesuite git checkout "$TAG" } @@ -203,7 +203,7 @@ create_osmo_trx_debian8_jessie - build limesuite no_commit --git-upstream-tree="$(get_last_tag limesuite)" + build limesuite no_commit --git-upstream-tree="357ad5dd0d71304179d476b38e67240527d917df" build osmo-gsm-manuals build libosmocore build libosmo-sccp -- To view, visit https://gerrit.osmocom.org/13696 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1 Gerrit-Change-Number: 13696 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: roh
Change in osmo-ci[master]: nightly-packages: Update limesuite hash to support LimeNet-Micro
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/13696 ) Change subject: nightly-packages: Update limesuite hash to support LimeNet-Micro .. Patch Set 1: Verified+1 -- To view, visit https://gerrit.osmocom.org/13696 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1 Gerrit-Change-Number: 13696 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 18 Apr 2019 21:49:36 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in openbsc[master]: Fixed MNCC_RTP_CREATE after MNCC_DISC_IND.
Rafael Diniz has uploaded this change for review. ( https://gerrit.osmocom.org/13703 Change subject: Fixed MNCC_RTP_CREATE after MNCC_DISC_IND. .. Fixed MNCC_RTP_CREATE after MNCC_DISC_IND. Change-Id: I3690acebf882d3a8abbeabe0e3aefdfcd066a052 --- M openbsc/src/libmsc/gsm_04_08.c 1 file changed, 3 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/03/13703/1 diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c index 09e35cc..ca98d35 100644 --- a/openbsc/src/libmsc/gsm_04_08.c +++ b/openbsc/src/libmsc/gsm_04_08.c @@ -3787,6 +3787,9 @@ return rc; } + if(msg_type == MNCC_REL_REQ && conn->mncc_rtp_create_pending) + conn->mncc_rtp_create_pending = 0; + DEBUGP(DCC, "(bts %d trx %d ts %d ti %02x sub %s) " "Received '%s' from MNCC in state %d (%s)\n", conn->bts->nr, conn->lchan->ts->trx->nr, conn->lchan->ts->nr, -- To view, visit https://gerrit.osmocom.org/13703 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: openbsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3690acebf882d3a8abbeabe0e3aefdfcd066a052 Gerrit-Change-Number: 13703 Gerrit-PatchSet: 1 Gerrit-Owner: Rafael Diniz
Change in libosmocore[master]: gsm/abis_nm.c: account \0 in abis_nm_put_sw_desc()
Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13702 Change subject: gsm/abis_nm.c: account \0 in abis_nm_put_sw_desc() .. gsm/abis_nm.c: account \0 in abis_nm_put_sw_desc() Change-Id: Id10b1bcb39ef0af296cd3f4d5e7ebe210b7a3a27 --- M src/gsm/abis_nm.c 1 file changed, 3 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/02/13702/1 diff --git a/src/gsm/abis_nm.c b/src/gsm/abis_nm.c index a4c0e41..ac4e6e7 100644 --- a/src/gsm/abis_nm.c +++ b/src/gsm/abis_nm.c @@ -791,8 +791,9 @@ uint16_t abis_nm_put_sw_file(struct msgb *msg, const char *id, const char *ver, bool put_sw_desc) { struct abis_nm_sw_desc sw = { - .file_id_len = strlen(id), - .file_version_len = strlen(ver), + /* We should also account \0 */ + .file_id_len = strlen(id) + 1, + .file_version_len = strlen(ver) + 1, }; memcpy(sw.file_id, id, sw.file_id_len); -- To view, visit https://gerrit.osmocom.org/13702 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id10b1bcb39ef0af296cd3f4d5e7ebe210b7a3a27 Gerrit-Change-Number: 13702 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy
Change in osmo-bts[master]: common/oml.c: use proper NACK reason in oml_tx_attr_resp()
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13700 ) Change subject: common/oml.c: use proper NACK reason in oml_tx_attr_resp() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13700 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I482caa0747f81da2979bfbdbd22bd6962af728cd Gerrit-Change-Number: 13700 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Comment-Date: Thu, 18 Apr 2019 19:59:34 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bts[master]: common/oml.c: refactor OML msgb allocation in oml_tx_attr_resp()
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13698 ) Change subject: common/oml.c: refactor OML msgb allocation in oml_tx_attr_resp() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13698 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ib8c1f77aad784b6f5cbe888a5139d7afb456924d Gerrit-Change-Number: 13698 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Comment-Date: Thu, 18 Apr 2019 19:58:56 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bts[master]: common/oml.c: constify argument 'trx' of handle_attrs_trx()
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13699 ) Change subject: common/oml.c: constify argument 'trx' of handle_attrs_trx() .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13699 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id476d492b3c1d0c728fca9eb0fb2254512bdef72 Gerrit-Change-Number: 13699 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Comment-Date: Thu, 18 Apr 2019 19:59:11 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bts[master]: common/oml.c: constify argument 'trx' of handle_attrs_trx()
Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13699 Change subject: common/oml.c: constify argument 'trx' of handle_attrs_trx() .. common/oml.c: constify argument 'trx' of handle_attrs_trx() Change-Id: Id476d492b3c1d0c728fca9eb0fb2254512bdef72 --- M include/osmo-bts/phy_link.h M src/common/oml.c 2 files changed, 3 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/99/13699/1 diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h index 2472c05..812f186 100644 --- a/include/osmo-bts/phy_link.h +++ b/include/osmo-bts/phy_link.h @@ -166,7 +166,7 @@ void phy_user_statechg_notif(struct phy_instance *pinst, enum phy_link_state link_state); -static inline struct phy_instance *trx_phy_instance(struct gsm_bts_trx *trx) +static inline struct phy_instance *trx_phy_instance(const struct gsm_bts_trx *trx) { OSMO_ASSERT(trx); return trx->role_bts.l1h; diff --git a/src/common/oml.c b/src/common/oml.c index df85fbe..83b8f29 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -155,7 +155,7 @@ msgb_tl16v_put(msg, NM_ATT_MANUF_ID, _NUM_BTS_FEAT/8 + 1, bts->_features_data); } -static inline void add_trx_attr(struct msgb *msg, struct gsm_bts_trx *trx) +static inline void add_trx_attr(struct msgb *msg, const struct gsm_bts_trx *trx) { const struct phy_instance *pinst = trx_phy_instance(trx); @@ -191,7 +191,7 @@ return len + out_offset + 1; } -static inline int handle_attrs_trx(uint8_t *out, struct gsm_bts_trx *trx, const uint8_t *attr, uint16_t attr_len) +static inline int handle_attrs_trx(uint8_t *out, const struct gsm_bts_trx *trx, const uint8_t *attr, uint16_t attr_len) { uint16_t i, attr_out_index = 1; /* byte 0 is reserved for unsupported attributes counter */ struct msgb *attr_buf = oml_msgb_alloc(); -- To view, visit https://gerrit.osmocom.org/13699 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Id476d492b3c1d0c728fca9eb0fb2254512bdef72 Gerrit-Change-Number: 13699 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy
Change in osmo-bts[master]: common/oml.c: use proper OML object for Get Attribute Response
Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13701 Change subject: common/oml.c: use proper OML object for Get Attribute Response .. common/oml.c: use proper OML object for Get Attribute Response Change-Id: Icb1ee75d4bf680deb6365288d8c2053816a12217 --- M src/common/oml.c 1 file changed, 25 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/01/13701/1 diff --git a/src/common/oml.c b/src/common/oml.c index f5e50c0..cb1766b 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -252,26 +252,31 @@ } /* send 3GPP TS 52.021 §8.11.2 Get Attribute Response */ -static int oml_tx_attr_resp(struct gsm_bts *bts, const struct abis_om_fom_hdr *foh, const uint8_t *attr, - uint16_t attr_len) +static int oml_tx_attr_resp(const struct gsm_abis_mo *mo, + const uint8_t *attr, uint16_t attr_len) { struct msgb *nmsg; uint8_t resp[MAX_VERSION_LENGTH * attr_len * 2]; /* heuristic for Attribute Response Info space requirements */ + void *obj; int len; LOGP(DOML, LOGL_INFO, "%s Tx Get Attribute Response\n", -get_value_string(abis_nm_obj_class_names, foh->obj_class)); +get_value_string(abis_nm_obj_class_names, mo->obj_class)); - switch (foh->obj_class) { + OSMO_ASSERT(mo->bts != NULL); + obj = gsm_objclass2obj(mo->bts, mo->obj_class, >obj_inst); + OSMO_ASSERT(obj != NULL); + + switch (mo->obj_class) { case NM_OC_BTS: - len = handle_attrs_bts(resp, bts, attr, attr_len); + len = handle_attrs_bts(resp, (const struct gsm_bts *) obj, attr, attr_len); break; case NM_OC_BASEB_TRANSC: - len = handle_attrs_trx(resp, gsm_bts_trx_num(bts, foh->obj_inst.trx_nr), attr, attr_len); + len = handle_attrs_trx(resp, (const struct gsm_bts_trx *) obj, attr, attr_len); break; default: LOGP(DOML, LOGL_ERROR, "Unsupported MO class %s in Get Attribute Response\n", -get_value_string(abis_nm_obj_class_names, foh->obj_class)); +get_value_string(abis_nm_obj_class_names, mo->obj_class)); len = -NM_NACK_OBJCLASS_NOTSUPP; } @@ -287,7 +292,7 @@ /* §9.4.64 Get Attribute Response Info */ msgb_tl16v_put(nmsg, NM_ATT_GET_ARI, len, resp); - len = oml_mo_send_msg(>mo, nmsg, NM_MT_GET_ATTR_RESP); + len = oml_mo_send_msg(mo, nmsg, NM_MT_GET_ATTR_RESP); return (len < 0) ? -NM_NACK_CANT_PERFORM : len; } @@ -527,6 +532,7 @@ static int oml_rx_get_attr(struct gsm_bts *bts, struct msgb *msg) { struct abis_om_fom_hdr *foh = msgb_l3(msg); + const struct gsm_abis_mo *mo; struct tlv_parsed tp; int rc; @@ -536,18 +542,26 @@ abis_nm_debugp_foh(DOML, foh); DEBUGPC(DOML, "Rx GET ATTR\n"); + /* Determine which OML object is addressed */ + mo = gsm_objclass2mo(bts, foh->obj_class, >obj_inst); + if (!mo) { + LOGP(DOML, LOGL_ERROR, "%s Get Attributes for unknown Object Instance\n", +abis_nm_dump_foh(foh)); + return oml_fom_ack_nack(msg, NM_NACK_OBJINST_UNKN); + } + rc = oml_tlv_parse(, foh->data, msgb_l3len(msg) - sizeof(*foh)); if (rc < 0) { - oml_tx_failure_event_rep(>mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute parsing failure"); + oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute parsing failure"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } if (!TLVP_PRES_LEN(, NM_ATT_LIST_REQ_ATTR, 1)) { - oml_tx_failure_event_rep(>mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute without Attribute List"); + oml_tx_failure_event_rep(mo, OSMO_EVT_MAJ_UNSUP_ATTR, "Get Attribute without Attribute List"); return oml_fom_ack_nack(msg, NM_NACK_INCORR_STRUCT); } - rc = oml_tx_attr_resp(bts, foh, TLVP_VAL(, NM_ATT_LIST_REQ_ATTR), TLVP_LEN(, NM_ATT_LIST_REQ_ATTR)); + rc = oml_tx_attr_resp(mo, TLVP_VAL(, NM_ATT_LIST_REQ_ATTR), TLVP_LEN(, NM_ATT_LIST_REQ_ATTR)); if (rc < 0) { LOGP(DOML, LOGL_ERROR, "responding to O Get Attributes message with NACK 0%x\n", -rc); return oml_fom_ack_nack(msg, -rc); -- To view, visit https://gerrit.osmocom.org/13701 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Icb1ee75d4bf680deb6365288d8c2053816a12217 Gerrit-Change-Number: 13701 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy
Change in osmo-bts[master]: common/oml.c: refactor OML msgb allocation in oml_tx_attr_resp()
Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13698 Change subject: common/oml.c: refactor OML msgb allocation in oml_tx_attr_resp() .. common/oml.c: refactor OML msgb allocation in oml_tx_attr_resp() There is no need to allocate a new OML message buffer before handing the list of requested attributes. Change-Id: Ib8c1f77aad784b6f5cbe888a5139d7afb456924d --- M src/common/oml.c 1 file changed, 5 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/98/13698/1 diff --git a/src/common/oml.c b/src/common/oml.c index 80d424f..df85fbe 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -255,16 +255,13 @@ static int oml_tx_attr_resp(struct gsm_bts *bts, const struct abis_om_fom_hdr *foh, const uint8_t *attr, uint16_t attr_len) { - struct msgb *nmsg = oml_msgb_alloc(); + struct msgb *nmsg; uint8_t resp[MAX_VERSION_LENGTH * attr_len * 2]; /* heuristic for Attribute Response Info space requirements */ int len; LOGP(DOML, LOGL_INFO, "%s Tx Get Attribute Response\n", get_value_string(abis_nm_obj_class_names, foh->obj_class)); - if (!nmsg) - return -NM_NACK_CANT_PERFORM; - switch (foh->obj_class) { case NM_OC_BTS: len = handle_attrs_bts(resp, bts, attr, attr_len); @@ -280,10 +277,13 @@ if (len < 0) { LOGP(DOML, LOGL_ERROR, "Tx Get Attribute Response FAILED with %d\n", len); - msgb_free(nmsg); return len; } + nmsg = oml_msgb_alloc(); + if (!nmsg) + return -NM_NACK_CANT_PERFORM; + /* §9.4.64 Get Attribute Response Info */ msgb_tl16v_put(nmsg, NM_ATT_GET_ARI, len, resp); -- To view, visit https://gerrit.osmocom.org/13698 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: Ib8c1f77aad784b6f5cbe888a5139d7afb456924d Gerrit-Change-Number: 13698 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy
Change in osmo-bts[master]: common/oml.c: use proper NACK reason in oml_tx_attr_resp()
Vadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/13700 Change subject: common/oml.c: use proper NACK reason in oml_tx_attr_resp() .. common/oml.c: use proper NACK reason in oml_tx_attr_resp() Change-Id: I482caa0747f81da2979bfbdbd22bd6962af728cd --- M src/common/oml.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/00/13700/1 diff --git a/src/common/oml.c b/src/common/oml.c index 83b8f29..f5e50c0 100644 --- a/src/common/oml.c +++ b/src/common/oml.c @@ -272,7 +272,7 @@ default: LOGP(DOML, LOGL_ERROR, "Unsupported MO class %s in Get Attribute Response\n", get_value_string(abis_nm_obj_class_names, foh->obj_class)); - len = -NM_NACK_RES_NOTIMPL; + len = -NM_NACK_OBJCLASS_NOTSUPP; } if (len < 0) { -- To view, visit https://gerrit.osmocom.org/13700 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I482caa0747f81da2979bfbdbd22bd6962af728cd Gerrit-Change-Number: 13700 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy
Change in osmo-ci[master]: nightly-packages: Update limesuite hash to support LimeNet-Micro
Harald Welte has posted comments on this change. ( https://gerrit.osmocom.org/13696 ) Change subject: nightly-packages: Update limesuite hash to support LimeNet-Micro .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13696 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1 Gerrit-Change-Number: 13696 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 18 Apr 2019 18:14:13 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-ci[master]: nightly-packages: Update limesuite hash to support LimeNet-Micro
roh has posted comments on this change. ( https://gerrit.osmocom.org/13696 ) Change subject: nightly-packages: Update limesuite hash to support LimeNet-Micro .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/13696 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1 Gerrit-Change-Number: 13696 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 18 Apr 2019 16:02:45 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-ci[master]: nightly-packages: Update limesuite hash to support LimeNet-Micro
roh has posted comments on this change. ( https://gerrit.osmocom.org/13696 ) Change subject: nightly-packages: Update limesuite hash to support LimeNet-Micro .. Patch Set 1: seems fine to me. -- To view, visit https://gerrit.osmocom.org/13696 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1 Gerrit-Change-Number: 13696 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol Gerrit-Reviewer: roh Gerrit-Comment-Date: Thu, 18 Apr 2019 16:02:21 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in osmo-ccid-firmware[master]: switch UART_debug to ASYNC
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13673 to look at the new patch set (#9). Change subject: switch UART_debug to ASYNC .. switch UART_debug to ASYNC using the synchronous HAL library causes RX overflow after 5 bytes on bulk incoming data (e.g. pasted). this mainly due to printing synchronously the character, but to further prevent congestion we switch to asynchronous (e.g. interrupt driven) communication. The RX part works great now (no overflow), but the TX part is malfunctioning because the HAL Async library does not buffer the data to be transmitted and expects it to be in memory until the transmission is complete (which printf does not do). This change will not be reflected in Atmel START since it does not allow to set the underlying STDIO redirect peripheral to async. Change-Id: If18883e96f336aa9f6b11607859260da5e1503c7 --- M sysmoOCTSIM/command.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/driver_init.h M sysmoOCTSIM/hpl/sercom/hpl_sercom.c M sysmoOCTSIM/main.c M sysmoOCTSIM/manual_test.c M sysmoOCTSIM/stdio_start.c 7 files changed, 73 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/73/13673/9 -- To view, visit https://gerrit.osmocom.org/13673 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: If18883e96f336aa9f6b11607859260da5e1503c7 Gerrit-Change-Number: 13673 Gerrit-PatchSet: 9 Gerrit-Owner: Kévin Redon Gerrit-Reviewer: Jenkins Builder (102)
Change in osmo-ccid-firmware[master]: UART_debug now uses the async library with tx ring
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13678 to look at the new patch set (#9). Change subject: UART_debug now uses the async library with tx ring .. UART_debug now uses the async library with tx ring Change-Id: I4cf689a8d3dc292201f1e2ce6c013aa1686ad6bc --- M sysmoOCTSIM/command.c M sysmoOCTSIM/driver_init.c M sysmoOCTSIM/driver_init.h M sysmoOCTSIM/manual_test.c M sysmoOCTSIM/stdio_start.c 5 files changed, 13 insertions(+), 18 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ccid-firmware refs/changes/78/13678/9 -- To view, visit https://gerrit.osmocom.org/13678 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ccid-firmware Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4cf689a8d3dc292201f1e2ce6c013aa1686ad6bc Gerrit-Change-Number: 13678 Gerrit-PatchSet: 9 Gerrit-Owner: Kévin Redon Gerrit-Reviewer: Jenkins Builder (102)
Change in osmo-hlr[master]: GSUP routing: use Message Class IE
Neels Hofmeyr has abandoned this change. ( https://gerrit.osmocom.org/13588 ) Change subject: GSUP routing: use Message Class IE .. Abandoned squashed into 13006 -- To view, visit https://gerrit.osmocom.org/13588 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: abandon Gerrit-Change-Id: I8dc3967d9372d63e9d57ca2608dd3316edb234a4 Gerrit-Change-Number: 13588 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (102) Gerrit-CC: Vadim Yanitskiy Gerrit-CC: osmith
Change in osmo-hlr[master]: hlr.c: forward GSUP messages between clients
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/13006 ) Change subject: hlr.c: forward GSUP messages between clients .. Patch Set 13: few more fixes for this patch in new patch set: - logging tweaks - use "message_class", not "kind" -- To view, visit https://gerrit.osmocom.org/13006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Gerrit-Change-Number: 13006 Gerrit-PatchSet: 13 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: osmith Gerrit-CC: Vadim Yanitskiy Gerrit-Comment-Date: Thu, 18 Apr 2019 13:42:19 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in osmo-hlr[master]: hlr.c: forward GSUP messages between clients
Neels Hofmeyr has uploaded a new patch set (#13) to the change originally created by osmith. ( https://gerrit.osmocom.org/13006 ) Change subject: hlr.c: forward GSUP messages between clients .. hlr.c: forward GSUP messages between clients Allow clients to forward any GSUP message between clients. Determine the sender and receiver from the new {source,dest}_name{,_len} IEs. Reject messages with a forged source name. This will be used for the inter-MSC handover. Depends: Ic00b0601eacff6d72927cea51767801142ee75db (libosmocore.git) Related: OS#3793 Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 --- M src/hlr.c 1 file changed, 79 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/06/13006/13 -- To view, visit https://gerrit.osmocom.org/13006 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hlr Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ia4f345abc877baaf0a8f73b8988e6514d9589bf5 Gerrit-Change-Number: 13006 Gerrit-PatchSet: 13 Gerrit-Owner: osmith Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: osmith Gerrit-CC: Vadim Yanitskiy
Change in osmo-gsm-tester[master]: resources.conf.prod: Update config to use new smart socket HW setup
Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13697 Change subject: resources.conf.prod: Update config to use new smart socket HW setup .. resources.conf.prod: Update config to use new smart socket HW setup Change-Id: I5cfce927569b6a2d8ca57d3394116bbcff3eee56 --- M example/resources.conf.prod 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/97/13697/1 diff --git a/example/resources.conf.prod b/example/resources.conf.prod index a65add0..49c33c7 100644 --- a/example/resources.conf.prod +++ b/example/resources.conf.prod @@ -90,8 +90,8 @@ trx_list: - addr: 10.42.42.120 power_supply: -type: 'sispm' -device: '01:01:4d:98:24' +type: 'intellinet' +device: '10.9.25.250' port: '1' - label: NanoBTS-ONW-900 @@ -102,13 +102,13 @@ trx_list: - addr: 10.42.42.121 power_supply: -type: 'sispm' -device: '01:01:4d:98:24' +type: 'intellinet' +device: '10.9.25.250' port: '2' - addr: 10.42.42.122 power_supply: -type: 'sispm' -device: '01:01:4d:98:24' +type: 'intellinet' +device: '10.9.25.250' port: '3' - label: OsmoBTS Virtual -- To view, visit https://gerrit.osmocom.org/13697 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gsm-tester Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I5cfce927569b6a2d8ca57d3394116bbcff3eee56 Gerrit-Change-Number: 13697 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol
Change in osmo-mgw[master]: move MGW endpoint FSM from osmo-bsc to here
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/13590 to look at the new patch set (#3). Change subject: move MGW endpoint FSM from osmo-bsc to here .. move MGW endpoint FSM from osmo-bsc to here Move mgw_endpoint_fsm from osmo-bsc here as osmo_mgcpc_ep_fsm. Apply various renames for consistency. Use osmo_tdef from libosmocore instead of osmo-bsc's (so far) local T_defs API. Change T23042 to T2427001, which is a slightly less arbitrary number and slightly more extendable in the future (2427 corresponds to the default MGCP port at osmo-mgw, 001 is the first MGCP timer and so far the only one). Change-Id: I9a3effd38e72841529df6c135c077116981dea36 --- M include/Makefile.am A include/osmocom/mgcp_client/mgcp_client_endpoint_fsm.h M include/osmocom/mgcp_client/mgcp_client_fsm.h M src/libosmo-mgcp-client/Makefile.am A src/libosmo-mgcp-client/mgcp_client_endpoint_fsm.c M src/libosmo-mgcp-client/mgcp_client_fsm.c 6 files changed, 808 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/90/13590/3 -- To view, visit https://gerrit.osmocom.org/13590 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I9a3effd38e72841529df6c135c077116981dea36 Gerrit-Change-Number: 13590 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (102)
Change in libosmocore[master]: GSUP: add inter-MSC handover related msgs and IEs
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/12860 ) Change subject: GSUP: add inter-MSC handover related msgs and IEs .. Patch Set 9: > enum gsm0808_cause *cause_bssap; could do for that uint8_t value. But enum pointer won't work, because enum has a different size than uint8_t so can't point into the msgb. I would prefer using the "decoded" enum value instead of uint8_t there. Is this important to you or can we leave it as it is? -- To view, visit https://gerrit.osmocom.org/12860 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ic00b0601eacff6d72927cea51767801142ee75db Gerrit-Change-Number: 12860 Gerrit-PatchSet: 9 Gerrit-Owner: osmith Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Max Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: osmith Gerrit-Comment-Date: Thu, 18 Apr 2019 13:14:37 + Gerrit-HasComments: No Gerrit-HasLabels: No
Change in libosmo-sccp[master]: add caller-owns-msgb variant osmo_sccp_user_sap_down_nofree()
Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13277 ) Change subject: add caller-owns-msgb variant osmo_sccp_user_sap_down_nofree() .. add caller-owns-msgb variant osmo_sccp_user_sap_down_nofree() Add osmo_sccp_user_sap_down_nofree(), which is identical to osmo_sccp_user_sap_down(), but doesn't imply a msgb_free(). To implement that, sccp_sclc_user_sap_down_nofree() with the same msgb semantics is required. Rationale: Avoiding msgb leaks is easiest if the caller retains ownership of the msgb. Take this hypothetical chain where leaks are obviously avoided: void send() { msg = msgb_alloc(); dispatch(msg); msgb_free(msg); } void dispatch(msg) { osmo_fsm_inst_dispatch(fi, msg); } void fi_on_event(fi, data) { if (socket_is_ok) socket_write((struct msgb*)data); } void socket_write(msgb) { if (!ok1) return; if (ok2) { if (!ok3) return; write(sock, msg->data); } } However, if the caller passes ownership down to the msgb consumer, things become nightmarishly complex: void send() { msg = msgb_alloc(); rc = dispatch(msg); /* dispatching event failed? */ if (rc) msgb_free(msg); } int dispatch(msg) { if (osmo_fsm_inst_dispatch(fi, msg)) return -1; if (something_else()) return -1; // <-- double free! } void fi_on_event(fi, data) { if (socket_is_ok) { socket_write((struct msgb*)data); else /* socket didn't consume? */ msgb_free(data); } int socket_write(msgb) { if (!ok1) return -1; // <-- leak! if (ok2) { if (!ok3) goto out; write(sock, msg->data); } out: msgb_free(msg); return -2; } If any link in this call chain fails to be aware of the importance to return a failed RC or to free a msgb if the chain is broken, or to not return a failed RC if the msgb is consumed, we have a hidden msgb leak or double free. This is the case with osmo_sccp_user_sap_down(). In new osmo-msc, passing data through various FSM instances, there is high potential for leak/double-free bugs. A very large brain is required to track down every msgb path. osmo_sccp_user_sap_down_nofree() makes this problem trivial to solve even for humans. Change-Id: Ic818efa78b90f727e1a94c18b60d9a306644f340 --- M include/osmocom/sigtran/sccp_sap.h M src/sccp_internal.h M src/sccp_sclc.c M src/sccp_scoc.c 4 files changed, 38 insertions(+), 23 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index 84d762c..f64b7aa 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -263,6 +263,7 @@ osmo_prim_cb prim_cb, uint16_t ssn); int osmo_sccp_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); +int osmo_sccp_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); struct osmo_ss7_instance * osmo_sccp_addr_by_name(struct osmo_sccp_addr *dest_addr, diff --git a/src/sccp_internal.h b/src/sccp_internal.h index ad8a6fd..8df6c9b 100644 --- a/src/sccp_internal.h +++ b/src/sccp_internal.h @@ -116,6 +116,7 @@ /* SCU -> SCLC */ int sccp_sclc_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); +int sccp_sclc_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph); struct msgb *sccp_msgb_alloc(const char *name); diff --git a/src/sccp_sclc.c b/src/sccp_sclc.c index db67660..218fb56 100644 --- a/src/sccp_sclc.c +++ b/src/sccp_sclc.c @@ -115,15 +115,14 @@ return rc; } -/*! \brief Main entrance function for primitives from SCCP User +/*! Main entrance function for primitives from SCCP User. + * The caller is required to free oph->msg, otherwise the same as sccp_sclc_user_sap_down(). * \param[in] scu SCCP User who is sending the primitive * \param[on] oph Osmocom primitive header of the primitive * \returns 0 on success; negtive in case of error */ -int sccp_sclc_user_sap_down(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph) +int sccp_sclc_user_sap_down_nofree(struct osmo_sccp_user *scu, struct osmo_prim_hdr *oph) { struct osmo_scu_prim *prim = (struct osmo_scu_prim *) oph; - struct msgb *msg = prim->oph.msg; - int rc = 0; /* we get called from osmo_sccp_user_sap_down() which already * has debug-logged the primitive */ @@ -131,20 +130,26 @@ switch (OSMO_PRIM_HDR(>oph)) { case
Change in libosmo-sccp[master]: add osmo_sccp_addr_cmp(), osmo_sccp_addr_ri_cmp()
Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/13118 ) Change subject: add osmo_sccp_addr_cmp(), osmo_sccp_addr_ri_cmp() .. add osmo_sccp_addr_cmp(), osmo_sccp_addr_ri_cmp() osmo-msc identifies its BSC and RNC peers by SCCP address, and compares those by memcmp(), which is not really accurate. Rather provide a meaningful osmo_sccp_addr_cmp() API to determine whether SCCP addresses are identical. Go for a full cmp that would also allow sorting. Change-Id: Ie9e2add7bbfae651c04e230d62e37cebeb91b0f5 --- M include/osmocom/sigtran/sccp_sap.h M src/sccp_user.c M tests/xua/xua_test.c M tests/xua/xua_test.ok 4 files changed, 392 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified Harald Welte: Looks good to me, approved diff --git a/include/osmocom/sigtran/sccp_sap.h b/include/osmocom/sigtran/sccp_sap.h index f64b7aa..9d285eb 100644 --- a/include/osmocom/sigtran/sccp_sap.h +++ b/include/osmocom/sigtran/sccp_sap.h @@ -276,5 +276,8 @@ uint32_t ssn); bool osmo_sccp_check_addr(struct osmo_sccp_addr *addr, uint32_t presence); +int osmo_sccp_addr_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria); +int osmo_sccp_addr_ri_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b); +int osmo_sccp_gt_cmp(const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b); const char *osmo_sccp_user_name(struct osmo_sccp_user *scu); diff --git a/src/sccp_user.c b/src/sccp_user.c index 8a98e46..63eba2a 100644 --- a/src/sccp_user.c +++ b/src/sccp_user.c @@ -293,6 +293,124 @@ return true; } +/*! Compare two SCCP Global Titles. + * \param[in] a left side. + * \param[in] b right side. + * \return -1 if a < b, 1 if a > b, and 0 if a == b. + */ +int osmo_sccp_gt_cmp(const struct osmo_sccp_gt *a, const struct osmo_sccp_gt *b) +{ + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + return memcmp(a, b, sizeof(*a)); +} + +/*! Compare two SCCP addresses by given presence criteria. + * Any OSMO_SCCP_ADDR_T_* type not set in presence_criteria is ignored. + * In case all bits are set in presence_criteria, the comparison is in the order of: + * OSMO_SCCP_ADDR_T_GT, OSMO_SCCP_ADDR_T_PC, OSMO_SCCP_ADDR_T_IPv4, OSMO_SCCP_ADDR_T_IPv6, OSMO_SCCP_ADDR_T_SSN. + * The SCCP addresses' Routing Indicator is not compared, see osmo_sccp_addr_ri_cmp(). + * \param[in] a left side. + * \param[in] b right side. + * \param[in] presence_criteria A bitmask of OSMO_SCCP_ADDR_T_* values, or 0x to compare all parts, except the + * routing indicator. + * \return -1 if a < b, 1 if a > b, and 0 if all checked values match. + */ +int osmo_sccp_addr_cmp(const struct osmo_sccp_addr *a, const struct osmo_sccp_addr *b, uint32_t presence_criteria) +{ + int rc; + if (a == b) + return 0; + if (!a) + return -1; + if (!b) + return 1; + + if (presence_criteria & OSMO_SCCP_ADDR_T_GT) { + if ((a->presence & OSMO_SCCP_ADDR_T_GT) != (b->presence & OSMO_SCCP_ADDR_T_GT)) + return (b->presence & OSMO_SCCP_ADDR_T_GT) ? -1 : 1; + rc = osmo_sccp_gt_cmp(>gt, >gt); + if (rc) + return rc; + } + + if (presence_criteria & OSMO_SCCP_ADDR_T_PC) { + if ((a->presence & OSMO_SCCP_ADDR_T_PC) != (b->presence & OSMO_SCCP_ADDR_T_PC)) + return (b->presence & OSMO_SCCP_ADDR_T_PC) ? -1 : 1; + + if ((a->presence & OSMO_SCCP_ADDR_T_PC) + && a->pc != b->pc) + return (a->pc < b->pc)? -1 : 1; + } + + if (presence_criteria & OSMO_SCCP_ADDR_T_IPv4) { + if ((a->presence & OSMO_SCCP_ADDR_T_IPv4) != (b->presence & OSMO_SCCP_ADDR_T_IPv4)) + return (b->presence & OSMO_SCCP_ADDR_T_IPv4) ? -1 : 1; + rc = memcmp(>ip.v4, >ip.v4, sizeof(a->ip.v4)); + if (rc) + return rc; + } + + if (presence_criteria & OSMO_SCCP_ADDR_T_IPv6) { + if ((a->presence & OSMO_SCCP_ADDR_T_IPv6) != (b->presence & OSMO_SCCP_ADDR_T_IPv6)) + return (b->presence & OSMO_SCCP_ADDR_T_IPv6) ? -1 : 1; + rc = memcmp(>ip.v6, >ip.v6, sizeof(a->ip.v6)); + if (rc) + return rc; + } + + if (presence_criteria & OSMO_SCCP_ADDR_T_SSN) { + if ((a->presence & OSMO_SCCP_ADDR_T_SSN) != (b->presence & OSMO_SCCP_ADDR_T_SSN)) + return (b->presence & OSMO_SCCP_ADDR_T_SSN) ? -1 : 1; + if (a->ssn != b->ssn) + return (a->ssn < b->ssn) ? -1 : 1; + } + + return
Change in osmo-sgsn[master]: gbproxy: parse dtap GSM48_MT_GSM_DEACT_PDP_REQ|ACK
Daniel Willmann has posted comments on this change. ( https://gerrit.osmocom.org/13628 ) Change subject: gbproxy: parse dtap GSM48_MT_GSM_DEACT_PDP_REQ|ACK .. Patch Set 1: Code-Review+1 (1 comment) https://gerrit.osmocom.org/#/c/13628/1/src/gprs/gprs_gb_parse.c File src/gprs/gprs_gb_parse.c: https://gerrit.osmocom.org/#/c/13628/1/src/gprs/gprs_gb_parse.c@390 PS1, Line 390: case GSM48_MT_GSM_DEACT_PDP_ACK: Since GSM48_MT_GSM_ACT_PDP_REQ extracts the apn to parse_ctx->apn_ie we could set parse_ctx->apn_ie{,_len} back to 0 here. I don't think it really matters, though. We shouldn't get any meaningful packets with apn set after a PDP deact ACK anyway. -- To view, visit https://gerrit.osmocom.org/13628 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I20bf4db8da746e0b994bfe3f8178188831b67ed3 Gerrit-Change-Number: 13628 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus Gerrit-Reviewer: Daniel Willmann Gerrit-Reviewer: Harald Welte Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Vadim Yanitskiy Gerrit-Reviewer: lynxis lazus Gerrit-Comment-Date: Thu, 18 Apr 2019 11:57:52 + Gerrit-HasComments: Yes Gerrit-HasLabels: Yes
Change in osmo-ci[master]: nightly-packages: Update limesuite hash to support LimeNet-Micro
Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/13696 Change subject: nightly-packages: Update limesuite hash to support LimeNet-Micro .. nightly-packages: Update limesuite hash to support LimeNet-Micro Newer LimeSuite (at least 7557e291209fc66a78ffa74dd8314e75841f7c96) is required to have LimeNet-Micro working properly with osmo-trx. We update to current newest master since other fixes related to sample rate are applied after the commit mentioned above. Related: OS#3861 Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1 --- M scripts/osmocom-nightly-packages.sh 1 file changed, 2 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/96/13696/1 diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh index 61cb250..0d4db2d 100755 --- a/scripts/osmocom-nightly-packages.sh +++ b/scripts/osmocom-nightly-packages.sh @@ -143,7 +143,7 @@ checkout_limesuite() { cd "$REPO" git clone https://github.com/myriadrf/LimeSuite limesuite - TAG="$(get_last_tag limesuite)" + TAG="357ad5dd0d71304179d476b38e67240527d917df" cd limesuite git checkout "$TAG" } @@ -203,7 +203,7 @@ create_osmo_trx_debian8_jessie - build limesuite no_commit --git-upstream-tree="$(get_last_tag limesuite)" + build limesuite no_commit --git-upstream-tree="357ad5dd0d71304179d476b38e67240527d917df" build osmo-gsm-manuals build libosmocore build libosmo-sccp -- To view, visit https://gerrit.osmocom.org/13696 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I62779f3bdbc4a459363a1d660d96d5f02f7763c1 Gerrit-Change-Number: 13696 Gerrit-PatchSet: 1 Gerrit-Owner: Pau Espin Pedrol