lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

January 2022

  • 3 participants
  • 781 discussions
Change in osmo-iuh[master]: iu_client: Fix incorrect access to null pointer
by pespin 13 Jan '22

13 Jan '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-iuh/+/26898 ) Change subject: iu_client: Fix incorrect access to null pointer ...................................................................... iu_client: Fix incorrect access to null pointer Fixes: adec82f3b1c725e8a70d327b9592940fbdeaaff7 Closes: Coverity CID#243765 Related: OS#5398 Change-Id: Ib435b053241c294619c3478fe3b6450d8d181888 --- M src/iu_client.c 1 file changed, 1 insertion(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/98/26898/1 diff --git a/src/iu_client.c b/src/iu_client.c index 7d29903..077ac27 100644 --- a/src/iu_client.c +++ b/src/iu_client.c @@ -462,8 +462,7 @@ struct osmo_scu_prim *prim; if (!uectx) { - LOGPIU(LOGL_ERROR, "Discarding to-be-transmitted L3 Message as RANAP DT with unset dst SCCP conn_id!\n", - uectx->conn_id); + LOGPIU(LOGL_ERROR, "Discarding to-be-transmitted L3 Message as RANAP DT with unset dst SCCP conn_id!\n"); return -ENOTCONN; } -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/26898 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: Ib435b053241c294619c3478fe3b6450d8d181888 Gerrit-Change-Number: 26898 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 3
0 0
Change in osmo-pcap[master]: Bump version: 0.2.1.4-b9be → 0.3.0
by pespin 13 Jan '22

13 Jan '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/26897 ) Change subject: Bump version: 0.2.1.4-b9be → 0.3.0 ...................................................................... Bump version: 0.2.1.4-b9be → 0.3.0 Change-Id: I7a4c45817dd3db7471b98b4db3b7bd2d4f3c240d --- M debian/changelog 1 file changed, 16 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/97/26897/1 diff --git a/debian/changelog b/debian/changelog index 90c0285..eb8b2cd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +osmo-pcap (0.3.0) unstable; urgency=medium + + [ Vadim Yanitskiy ] + * debian/control: minimum version for libzmq3-dev is 3.2.2 + + [ Harald Welte ] + * configure.ac: don't depend on libosmogb. + + [ Oliver Smith ] + * Revert "configure.ac: don't depend on libosmogb." + + [ Pau Espin Pedrol ] + * server: Add vty command file-permission-mask + + -- Pau Espin Pedrol <pespin(a)sysmocom.de> Thu, 13 Jan 2022 10:06:14 +0100 + osmo-pcap (0.2.1) unstable; urgency=medium [ Pau Espin Pedrol ] -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/26897 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: I7a4c45817dd3db7471b98b4db3b7bd2d4f3c240d Gerrit-Change-Number: 26897 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
1 2
0 0
Change in osmo-pcap[master]: Add vty command file-permission-mask
by pespin 13 Jan '22

13 Jan '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcap/+/26895 ) Change subject: Add vty command file-permission-mask ...................................................................... Add vty command file-permission-mask Change-Id: I78e0b56b38de438ee5fb679ae41c65b02ea2e722 --- M doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg M doc/examples/osmo-pcap-server/osmo-pcap-server.cfg M include/osmo-pcap/osmo_pcap_server.h M src/osmo_server_main.c M src/osmo_server_network.c M src/osmo_server_vty.c 6 files changed, 47 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/95/26895/1 diff --git a/doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg b/doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg index 52f66f5..1b89ba5 100644 --- a/doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg +++ b/doc/examples/osmo-pcap-server/osmo-pcap-server-tls.cfg @@ -16,6 +16,7 @@ ! server base-path /tmp + file-permission-mask 0440 server ip 127.0.0.1 server port 6001 max-file-size 262144000 diff --git a/doc/examples/osmo-pcap-server/osmo-pcap-server.cfg b/doc/examples/osmo-pcap-server/osmo-pcap-server.cfg index 2f4123a..e380113 100644 --- a/doc/examples/osmo-pcap-server/osmo-pcap-server.cfg +++ b/doc/examples/osmo-pcap-server/osmo-pcap-server.cfg @@ -16,6 +16,7 @@ ! server base-path /tmp + file-permission-mask 0440 server ip 127.0.0.1 server port 6001 max-file-size 262144000 diff --git a/include/osmo-pcap/osmo_pcap_server.h b/include/osmo-pcap/osmo_pcap_server.h index 7de94a6..6d2afcf 100644 --- a/include/osmo-pcap/osmo_pcap_server.h +++ b/include/osmo-pcap/osmo_pcap_server.h @@ -129,6 +129,7 @@ bool dh_params_allocated; char *base_path; + mode_t permission_mask; off_t max_size; int max_snaplen; diff --git a/src/osmo_server_main.c b/src/osmo_server_main.c index f198b58..3b73b81 100644 --- a/src/osmo_server_main.c +++ b/src/osmo_server_main.c @@ -284,6 +284,7 @@ INIT_LLIST_HEAD(&pcap_server->conn); pcap_server->base_path = talloc_strdup(pcap_server, "./"); + pcap_server->permission_mask = 0440; pcap_server->max_size = 1073741824; pcap_server->max_snaplen = DEFAULT_SNAPLEN; diff --git a/src/osmo_server_network.c b/src/osmo_server_network.c index 47ede72..025f560 100644 --- a/src/osmo_server_network.c +++ b/src/osmo_server_network.c @@ -171,7 +171,7 @@ return; } - conn->local_fd = creat(conn->curr_filename, 0440); + conn->local_fd = creat(conn->curr_filename, conn->server->permission_mask); if (conn->local_fd < 0) { LOGP(DSERVER, LOGL_ERROR, "Failed to file: '%s'\n", conn->curr_filename); return; diff --git a/src/osmo_server_vty.c b/src/osmo_server_vty.c index 87bcfa2..f690b8d 100644 --- a/src/osmo_server_vty.c +++ b/src/osmo_server_vty.c @@ -88,6 +88,7 @@ if (pcap_server->base_path) vty_out(vty, " base-path %s%s", pcap_server->base_path, VTY_NEWLINE); + vty_out(vty, " file-permission-mask 0%o%s", pcap_server->permission_mask, VTY_NEWLINE); if (pcap_server->addr) vty_out(vty, " server ip %s%s", pcap_server->addr, VTY_NEWLINE); if (pcap_server->port > 0) @@ -132,6 +133,46 @@ return CMD_SUCCESS; } +DEFUN(cfg_server_file_permission_mask, + cfg_server_file_permission_mask_cmd, + "file-permission-mask MODE", + "Permission mask to use when creating pcap files\n" + "The file permission mask, in octal format (default: 0440)\n") +{ + long long unsigned val; + char *endptr; + + errno = 0; + val = strtoul(argv[0], &endptr, 8); + + switch (errno) { + case 0: + break; + case ERANGE: + case EINVAL: + default: + goto ret_invalid; + } + if (!endptr || *endptr) { + /* No chars were converted */ + if (endptr == argv[0]) + goto ret_invalid; + /* Or there are surplus chars after the converted number */ + goto ret_invalid; + } + + /* 'man mode_t': "According to POSIX, it shall be an integer type." */ + if (val > INT_MAX) + goto ret_invalid; + + pcap_server->permission_mask = val; + return CMD_SUCCESS; + +ret_invalid: + vty_out(vty, "%% File permission mask out of range: '%s'%s", argv[0], VTY_NEWLINE); + return CMD_WARNING; +} + DEFUN(cfg_server_ip, cfg_server_ip_cmd, "server ip A.B.C.D", @@ -519,6 +560,7 @@ install_node(&server_node, config_write_server); install_element(SERVER_NODE, &cfg_server_base_cmd); + install_element(SERVER_NODE, &cfg_server_file_permission_mask_cmd); install_element(SERVER_NODE, &cfg_server_ip_cmd); install_element(SERVER_NODE, &cfg_server_port_cmd); install_element(SERVER_NODE, &cfg_server_max_size_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/26895 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcap Gerrit-Branch: master Gerrit-Change-Id: I78e0b56b38de438ee5fb679ae41c65b02ea2e722 Gerrit-Change-Number: 26895 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
3 6
0 0
Change in osmo-hnbgw[master]: hnbgw_cn.c: fix sourcecode formatting
by dexter 13 Jan '22

13 Jan '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/26894 ) Change subject: hnbgw_cn.c: fix sourcecode formatting ...................................................................... hnbgw_cn.c: fix sourcecode formatting Change-Id: I50ec3a4a5c2f65c85adc177f83123991f949e9cf --- M src/osmo-hnbgw/hnbgw_cn.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/94/26894/1 diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c index 332451a..35e03fe 100644 --- a/src/osmo-hnbgw/hnbgw_cn.c +++ b/src/osmo-hnbgw/hnbgw_cn.c @@ -267,7 +267,7 @@ int rc; memset(pdu, 0, sizeof(*pdu)); - dec_ret = aper_decode(NULL,&asn_DEF_RANAP_RANAP_PDU, (void **) &pdu, + dec_ret = aper_decode(NULL, &asn_DEF_RANAP_RANAP_PDU, (void **) &pdu, data, len, 0, 0); if (dec_ret.code != RC_OK) { LOGP(DRANAP, LOGL_ERROR, "Error in RANAP ASN.1 decode\n"); -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/26894 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I50ec3a4a5c2f65c85adc177f83123991f949e9cf Gerrit-Change-Number: 26894 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
3 2
0 0
Change in osmo-bsc[master]: Fix DLCI CC bits transmitted in SAPI "n" REJECT
by pespin 13 Jan '22

13 Jan '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26893 ) Change subject: Fix DLCI CC bits transmitted in SAPI "n" REJECT ...................................................................... Fix DLCI CC bits transmitted in SAPI "n" REJECT The SAPI "n" REJECT messages were being sent with DLCI keeping the RSL LINK ID format, which is not the same for CC bits. With this patch, TTCN3 test BSC_Tests.TC_rll_sapi_n_reject_dlci_cc passes again. Related: OS#4728 Related: SYS#5047 Change-Id: Icc187f594743040a3d9b8beff7d9cfc21dd6eb08 --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/bsc_subscr_conn_fsm.c M src/osmo-bsc/gsm_08_08.c M src/osmo-bsc/osmo_bsc_bssap.c 4 files changed, 24 insertions(+), 23 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/93/26893/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 4e26ec1..910c3d3 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -56,6 +56,26 @@ #define OBSC_LINKID_CB(__msgb) (__msgb)->cb[3] +/* Data Link Connection Identifier (DLCI) is defined in 3GPP TS 48.006, section 9.3.2. + * .... .SSS - SAPI value used on the radio link; + * CC.. .... - control channel identification: + * 00.. .... - indicates that the control channel is not further specified, + * 10.. .... - represents the FACCH or the SDCCH, + * 11.. .... - represents the SACCH, + * other values are reserved. */ +#define RSL_LINK_ID2DLCI(link_id) \ + ((link_id & 0x40 ? 0xc0 : 0x80) | (link_id & 0x07)) + +/* RSL Link Identifier is defined in 3GPP TS 3GPP TS 48.058, section 9.3.2. + * .... .SSS - SAPI value used on the radio link; + * ...P P... - priority for SAPI0 messages; + * CC.. .... - control channel identification: + * 00.. .... - main signalling channel (FACCH or SDCCH), + * 01.. .... - SACCH, + * other values are reserved. */ +#define DLCI2RSL_LINK_ID(dlci) \ + ((dlci & 0xc0) == 0xc0 ? 0x40 : 0x00) | (dlci & 0x07) + /* 3-bit long values */ #define EARFCN_PRIO_INVALID 8 #define EARFCN_MEAS_BW_INVALID 8 diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index e33fe43..147e4b7 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -1147,16 +1147,16 @@ switch (rllr_ind) { case BSC_RLLR_IND_EST_CONF: - rsl_data_request(msg, OBSC_LINKID_CB(msg)); + rsl_data_request(msg, link_id); break; case BSC_RLLR_IND_REL_IND: - bsc_sapi_n_reject(lchan->conn, OBSC_LINKID_CB(msg), + bsc_sapi_n_reject(lchan->conn, RSL_LINK_ID2DLCI(link_id), GSM0808_CAUSE_MS_NOT_EQUIPPED); msgb_free(msg); break; case BSC_RLLR_IND_ERR_IND: case BSC_RLLR_IND_TIMEOUT: - bsc_sapi_n_reject(lchan->conn, OBSC_LINKID_CB(msg), + bsc_sapi_n_reject(lchan->conn, RSL_LINK_ID2DLCI(link_id), GSM0808_CAUSE_BSS_NOT_EQUIPPED); msgb_free(msg); break; @@ -1196,7 +1196,7 @@ rc = rll_establish(msg->lchan, sapi, rll_ind_cb, msg); if (rc) { msgb_free(msg); - bsc_sapi_n_reject(conn, link_id, GSM0808_CAUSE_BSS_NOT_EQUIPPED); + bsc_sapi_n_reject(conn, RSL_LINK_ID2DLCI(link_id), GSM0808_CAUSE_BSS_NOT_EQUIPPED); goto failed_to_send; } return; diff --git a/src/osmo-bsc/gsm_08_08.c b/src/osmo-bsc/gsm_08_08.c index 1715533..a99db43 100644 --- a/src/osmo-bsc/gsm_08_08.c +++ b/src/osmo-bsc/gsm_08_08.c @@ -536,15 +536,6 @@ return rc; } -/* Data Link Connection Identifier (DLCI) is defined in 3GPP TS 48.006, section 9.3.2. - * .... .SSS - SAPI value used on the radio link; - * CC.. .... - control channel identification: - * 00.. .... - indicates that the control channel is not further specified, - * 10.. .... - represents the FACCH or the SDCCH, - * 11.. .... - represents the SACCH, - * other values are reserved. */ -#define RSL_LINK_ID2DLCI(link_id) \ - (link_id & 0x40 ? 0xc0 : 0x80) | (link_id & 0x07) /*! MS->BSC/MSC: Um L3 message. */ void bsc_dtap(struct gsm_subscriber_connection *conn, uint8_t link_id, struct msgb *msg) diff --git a/src/osmo-bsc/osmo_bsc_bssap.c b/src/osmo-bsc/osmo_bsc_bssap.c index 904da62..3f56052 100644 --- a/src/osmo-bsc/osmo_bsc_bssap.c +++ b/src/osmo-bsc/osmo_bsc_bssap.c @@ -1208,16 +1208,6 @@ return ret; } -/* RSL Link Identifier is defined in 3GPP TS 3GPP TS 48.058, section 9.3.2. - * .... .SSS - SAPI value used on the radio link; - * ...P P... - priority for SAPI0 messages; - * CC.. .... - control channel identification: - * 00.. .... - main signalling channel (FACCH or SDCCH), - * 01.. .... - SACCH, - * other values are reserved. */ -#define DLCI2RSL_LINK_ID(dlci) \ - ((dlci & 0xc0) == 0xc0 ? 0x40 : 0x00) | (dlci & 0x07) - static int dtap_rcvmsg(struct gsm_subscriber_connection *conn, struct msgb *msg, unsigned int length) { -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26893 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icc187f594743040a3d9b8beff7d9cfc21dd6eb08 Gerrit-Change-Number: 26893 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
3 3
0 0
Change in osmo-bsc[master]: gscon clear: without SCCP conn, no need to wait for RLSD timeout
by fixeria 12 Jan '22

12 Jan '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26615 ) Change subject: gscon clear: without SCCP conn, no need to wait for RLSD timeout ...................................................................... gscon clear: without SCCP conn, no need to wait for RLSD timeout Skip the BSSMAP Clear and SCCP RLSD parts and immediately deallocate the gscon when there is no SCCP connection present. Before this patch, such conn would stick around for a minute before a timeout deallocates it. Related: OS#5337 Change-Id: I8c8537acf6b47b121903197608636c43ae601a57 --- M src/osmo-bsc/bsc_subscr_conn_fsm.c 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 1b5f372..2183b18 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -210,6 +210,10 @@ gscon_release_lchans(conn, true, bsc_gsm48_rr_cause_from_gsm0808_cause(conn->clear_cause)); osmo_mgcpc_ep_clear(conn->user_plane.mgw_endpoint); + + /* If there is no SCCP connection at all, then no need to wait for an SCCP RLSD. */ + if (!conn->sccp.msc || conn->sccp.state != SUBSCR_SCCP_ST_CONNECTED) + osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, NULL); } /* forward MO DTAP from RSL side to BSSAP side */ -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26615 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I8c8537acf6b47b121903197608636c43ae601a57 Gerrit-Change-Number: 26615 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: fix gscon clear 3/n: separate state for SCCP RLSD
by fixeria 12 Jan '22

12 Jan '22
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26614 ) Change subject: fix gscon clear 3/n: separate state for SCCP RLSD ...................................................................... fix gscon clear 3/n: separate state for SCCP RLSD Properly implement the separate conn release stages in separate FSM states: x) sent Clear Request, wait for a Clear Command from the MSC. Timeout after a configurable 60s. y) after a Clear Command and sending a Clear Complete, wait for the SCCP RLSD. Timeout after a configurable 60s. z) terminate after the RLSD is received / after timeout. handover_test.c needs a little tweak to make the MGCP release work with its fake MGCP client, because cleanup now ensures to invoke gscon_forget_mgw_endpoint() in all cases. Related: I680ec4ed866aa5f0b1ff29e7e98322615cfb288d (osmo-ttcn3-hacks) Related: OS#5337 Change-Id: Ie975117d37f38ba853589dc7f8d3e94f8f9586b2 --- M src/osmo-bsc/bsc_subscr_conn_fsm.c M tests/handover/handover_test.c 2 files changed, 75 insertions(+), 54 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index e33fe43..1b5f372 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -67,7 +67,8 @@ ST_ASSIGNMENT, ST_HANDOVER, /* BSSMAP CLEAR has been received */ - ST_CLEARING, + ST_WAIT_CLEAR_CMD, + ST_WAIT_SCCP_RLSD, }; static const struct value_string gscon_fsm_event_names[] = { @@ -95,7 +96,8 @@ struct osmo_tdef_state_timeout conn_fsm_timeouts[32] = { [ST_WAIT_CC] = { .T = -3210 }, - [ST_CLEARING] = { .T = -4 }, + [ST_WAIT_CLEAR_CMD] = { .T = -4 }, + [ST_WAIT_SCCP_RLSD] = { .T = -4 }, }; /* Transition to a state, using the T timer defined in conn_fsm_timeouts. @@ -143,44 +145,71 @@ { /* already clearing? */ switch (conn->fi->state) { - case ST_CLEARING: + case ST_WAIT_CLEAR_CMD: + case ST_WAIT_SCCP_RLSD: return; default: break; } conn->clear_cause = cause; - conn_fsm_state_chg(ST_CLEARING); + conn_fsm_state_chg(ST_WAIT_CLEAR_CMD); } -static void gscon_fsm_clearing_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +static void gscon_fsm_wait_clear_cmd_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct msgb *resp; int rc; struct gsm_subscriber_connection *conn = fi->priv; enum gsm0808_cause cause = conn->clear_cause; - if (conn->rx_clear_command) { - LOGPFSML(conn->fi, LOGL_DEBUG, "Not sending BSSMAP CLEAR REQUEST, already got CLEAR COMMAND from MSC\n"); - return; - } - if (!conn->sccp.msc) { LOGPFSML(fi, LOGL_ERROR, "Unable to deliver BSSMAP Clear Request message, no MSC for this conn\n"); - return; + goto nothing_sent; } LOGPFSML(fi, LOGL_DEBUG, "Tx BSSMAP CLEAR REQUEST(%s) to MSC\n", gsm0808_cause_name(cause)); resp = gsm0808_create_clear_rqst(cause); if (!resp) { LOGPFSML(fi, LOGL_ERROR, "Unable to compose BSSMAP Clear Request message\n"); - return; + goto nothing_sent; } rate_ctr_inc(rate_ctr_group_get_ctr(conn->sccp.msc->msc_ctrs, MSC_CTR_BSSMAP_TX_DT1_CLEAR_RQST)); rc = osmo_bsc_sigtran_send(conn, resp); - if (rc < 0) + if (rc < 0) { LOGPFSML(conn->fi, LOGL_ERROR, "Unable to deliver BSSMAP Clear Request message\n"); + goto nothing_sent; + } + return; + +nothing_sent: + /* Normally, we request a CLEAR from the MSC and terminate as soon as the CLEAR COMMAND has been issued by the + * MSC. But if we are trying to clear without being able to send anything to the MSC, we might as well shut down + * the conn right away now. */ + conn_fsm_state_chg(ST_WAIT_SCCP_RLSD); +} + +void gscon_fsm_wait_sccp_rlsd_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) +{ + struct gsm_subscriber_connection *conn = fi->priv; + + /* According to 3GPP 48.008 3.1.9.1. "The BSS need not wait for the radio channel + * release to be completed or for the guard timer to expire before returning the + * CLEAR COMPLETE message" */ + if (!gscon_sigtran_send(conn, gsm0808_create_clear_complete())) + rate_ctr_inc(rate_ctr_group_get_ctr(conn->sccp.msc->msc_ctrs, MSC_CTR_BSSMAP_TX_DT1_CLEAR_COMPLETE)); + + /* Give the handover_fsm a chance to book this as handover success before tearing down everything, + * making it look like a sudden death failure. */ + if (conn->ho.fi) + osmo_fsm_inst_dispatch(conn->ho.fi, HO_EV_CONN_RELEASING, NULL); + + if (conn->lcs.loc_req) + osmo_fsm_inst_dispatch(conn->lcs.loc_req->fi, LCS_LOC_REQ_EV_CONN_CLEAR, NULL); + + gscon_release_lchans(conn, true, bsc_gsm48_rr_cause_from_gsm0808_cause(conn->clear_cause)); + osmo_mgcpc_ep_clear(conn->user_plane.mgw_endpoint); } /* forward MO DTAP from RSL side to BSSAP side */ @@ -682,13 +711,13 @@ .name = "INIT", .in_event_mask = S(GSCON_EV_MO_COMPL_L3) | S(GSCON_EV_A_CONN_IND) | S(GSCON_EV_HANDOVER_END), - .out_state_mask = S(ST_WAIT_CC) | S(ST_ACTIVE) | S(ST_CLEARING), + .out_state_mask = S(ST_WAIT_CC) | S(ST_ACTIVE) | S(ST_WAIT_CLEAR_CMD) | S(ST_WAIT_SCCP_RLSD), .action = gscon_fsm_init, }, [ST_WAIT_CC] = { .name = "WAIT_CC", .in_event_mask = S(GSCON_EV_A_CONN_CFM), - .out_state_mask = S(ST_ACTIVE) | S(ST_CLEARING), + .out_state_mask = S(ST_ACTIVE) | S(ST_WAIT_CLEAR_CMD) | S(ST_WAIT_SCCP_RLSD), .action = gscon_fsm_wait_cc, }, [ST_ACTIVE] = { @@ -698,27 +727,32 @@ | S(GSCON_EV_LCS_LOC_REQ_END) | S(GSCON_EV_MO_COMPL_L3) , - .out_state_mask = S(ST_CLEARING) | S(ST_ASSIGNMENT) | + .out_state_mask = S(ST_WAIT_CLEAR_CMD) | S(ST_WAIT_SCCP_RLSD) | S(ST_ASSIGNMENT) | S(ST_HANDOVER), .action = gscon_fsm_active, }, [ST_ASSIGNMENT] = { .name = "ASSIGNMENT", .in_event_mask = EV_TRANSPARENT_SCCP | S(GSCON_EV_ASSIGNMENT_END), - .out_state_mask = S(ST_ACTIVE) | S(ST_CLEARING), + .out_state_mask = S(ST_ACTIVE) | S(ST_WAIT_CLEAR_CMD) | S(ST_WAIT_SCCP_RLSD), .action = gscon_fsm_assignment, }, [ST_HANDOVER] = { .name = "HANDOVER", .in_event_mask = EV_TRANSPARENT_SCCP | S(GSCON_EV_HANDOVER_END), - .out_state_mask = S(ST_ACTIVE) | S(ST_CLEARING), + .out_state_mask = S(ST_ACTIVE) | S(ST_WAIT_CLEAR_CMD) | S(ST_WAIT_SCCP_RLSD), .action = gscon_fsm_handover, }, - [ST_CLEARING] = { - .name = "CLEARING", - .onenter = gscon_fsm_clearing_onenter, - /* dead end state */ - }, + [ST_WAIT_CLEAR_CMD] = { + .name = "WAIT_CLEAR_CMD", + .onenter = gscon_fsm_wait_clear_cmd_onenter, + .out_state_mask = S(ST_WAIT_SCCP_RLSD), + }, + [ST_WAIT_SCCP_RLSD] = { + .name = "WAIT_SCCP_RLSD", + .onenter = gscon_fsm_wait_sccp_rlsd_onenter, + .in_event_mask = S(GSCON_EV_HANDOVER_END), + }, }; void gscon_change_primary_lchan(struct gsm_subscriber_connection *conn, struct gsm_lchan *new_lchan) @@ -848,44 +882,19 @@ static void gscon_fsm_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct gsm_subscriber_connection *conn = fi->priv; - const enum gsm0808_cause *cause_0808; const struct tlv_parsed *tp; struct osmo_mobile_identity mi_imsi; /* Regular allstate event processing */ switch (event) { case GSCON_EV_A_CLEAR_CMD: - conn->rx_clear_command = true; - - /* Give the handover_fsm a chance to book this as handover success before tearing down everything, - * making it look like a sudden death failure. */ - if (conn->ho.fi) - osmo_fsm_inst_dispatch(conn->ho.fi, HO_EV_CONN_RELEASING, NULL); - - if (conn->lcs.loc_req) - osmo_fsm_inst_dispatch(conn->lcs.loc_req->fi, LCS_LOC_REQ_EV_CONN_CLEAR, NULL); - OSMO_ASSERT(data); - cause_0808 = data; - /* MSC tells us to cleanly shut down */ - if (conn->fi->state != ST_CLEARING) - osmo_fsm_inst_state_chg(fi, ST_CLEARING, 60, -4); - LOGPFSML(fi, LOGL_DEBUG, "Releasing all lchans (if any) after BSSMAP Clear Command\n"); - gscon_release_lchans(conn, true, bsc_gsm48_rr_cause_from_gsm0808_cause(*cause_0808)); - /* FIXME: Release all terestrial resources in ST_CLEARING */ - /* According to 3GPP 48.008 3.1.9.1. "The BSS need not wait for the radio channel - * release to be completed or for the guard timer to expire before returning the - * CLEAR COMPLETE message" */ - - /* Close MGCP connections */ - osmo_mgcpc_ep_clear(conn->user_plane.mgw_endpoint); - - rate_ctr_inc(rate_ctr_group_get_ctr(conn->sccp.msc->msc_ctrs, MSC_CTR_BSSMAP_TX_DT1_CLEAR_COMPLETE)); - gscon_sigtran_send(conn, gsm0808_create_clear_complete()); + conn->clear_cause = *(const enum gsm0808_cause *)data; + conn_fsm_state_chg(ST_WAIT_SCCP_RLSD); break; case GSCON_EV_A_DISC_IND: - /* MSC or SIGTRAN network has hard-released SCCP connection, - * terminate the FSM now. */ + /* MSC or SIGTRAN network has hard-released SCCP connection, terminate the FSM now. + * Cleanup is done in gscon_pre_term() and gscon_cleanup(). */ osmo_fsm_inst_term(fi, OSMO_FSM_TERM_REGULAR, data); break; case GSCON_EV_FORGET_MGW_ENDPOINT: @@ -975,6 +984,13 @@ osmo_mgcpc_ep_clear(conn->user_plane.mgw_endpoint); conn->user_plane.mgw_endpoint = NULL; + conn->user_plane.mgw_endpoint = NULL; + + if (conn->ho.fi) + osmo_fsm_inst_dispatch(conn->ho.fi, HO_EV_CONN_RELEASING, NULL); + + if (conn->lcs.loc_req) + osmo_fsm_inst_dispatch(conn->lcs.loc_req->fi, LCS_LOC_REQ_EV_CONN_CLEAR, NULL); if (conn->lcls.fi) { /* request termination of LCLS FSM */ @@ -1013,8 +1029,9 @@ case -4: /* The MSC has sent a BSSMAP Clear Command, we acknowledged that, but the conn was never * disconnected. */ - LOGPFSML(fi, LOGL_ERROR, "Long after a BSSMAP Clear Command, the conn is still not" - " released. For sanity, discarding this conn now.\n"); + LOGPFSML(fi, LOGL_ERROR, "Long after expecting %s, the conn is still not" + " released. For sanity, discarding this conn now.\n", + fi->state == ST_WAIT_CLEAR_CMD ? "BSSMAP Clear Command" : "SCCP RLSD"); a_reset_conn_fail(conn->sccp.msc); osmo_fsm_inst_term(fi, OSMO_FSM_TERM_ERROR, NULL); break; diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c index 17bc048..dd2f16a 100644 --- a/tests/handover/handover_test.c +++ b/tests/handover/handover_test.c @@ -1710,3 +1710,7 @@ }; return &ret; } +struct mgcp_client *osmo_mgcpc_ep_client(const struct osmo_mgcpc_ep *ep) +{ + return NULL; +} -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26614 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ie975117d37f38ba853589dc7f8d3e94f8f9586b2 Gerrit-Change-Number: 26614 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-bsc[master]: fix gscon clear 3/n: separate state for SCCP RLSD
by fixeria 12 Jan '22

12 Jan '22
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26614 ) Change subject: fix gscon clear 3/n: separate state for SCCP RLSD ...................................................................... Patch Set 3: Code-Review+2 Re-applying my CR+1, summing up votes, merging. -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26614 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ie975117d37f38ba853589dc7f8d3e94f8f9586b2 Gerrit-Change-Number: 26614 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 12 Jan 2022 16:55:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: bsc: Fix test TC_rll_sapi_n_reject_dlci_cc expectancies
by pespin 12 Jan '22

12 Jan '22
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26890 ) Change subject: bsc: Fix test TC_rll_sapi_n_reject_dlci_cc expectancies ...................................................................... bsc: Fix test TC_rll_sapi_n_reject_dlci_cc expectancies Cause GSM0808_CAUSE_MS_NOT_EQUIPPED is to be transmitted only in the case BSC receives a RelInd from the MS/BTS. In this test, an ErrorInd is sent, as in TC_rll_err_ind_sapi_n_reject, so it is expected that the BSC will send the N_Reject message with cause GSM0808_CAUSE_BSS_NOT_EQUIPPED. Related: OS#4728 Related: SYS#5047 Fixes: 999ceb66373a93c0ab5adf14b313187789288c53 Change-Id: Ieebe3465b31d98fcae0e2c1993477c5021c99b3b --- M bsc/BSC_Tests.ttcn 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/90/26890/1 diff --git a/bsc/BSC_Tests.ttcn b/bsc/BSC_Tests.ttcn index 7bfc387..0dd4440 100644 --- a/bsc/BSC_Tests.ttcn +++ b/bsc/BSC_Tests.ttcn @@ -2591,7 +2591,7 @@ /* MS sends unexpected ERROR INDication on DCCH/ACCH SAPI=3 */ f_ipa_tx(0, ts_RSL_ERROR_IND(dt.rsl_chan_nr, ts_RslLinkID_DCCH(3), ''O)); - f_exp_sapi_n_reject(3, GSM0808_CAUSE_MS_NOT_EQUIPPED, '10'B); + f_exp_sapi_n_reject(3, GSM0808_CAUSE_BSS_NOT_EQUIPPED, '10'B); /* Clean up the connection */ BSSAP.send(ts_BSSAP_DISC_req(dt.sccp_conn_id, 0)); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/26890 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Ieebe3465b31d98fcae0e2c1993477c5021c99b3b Gerrit-Change-Number: 26890 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: newchange
3 6
0 0
Change in osmo-bsc[master]: fix gscon clear 3/n: separate state for SCCP RLSD
by pespin 12 Jan '22

12 Jan '22
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/26614 ) Change subject: fix gscon clear 3/n: separate state for SCCP RLSD ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/26614 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ie975117d37f38ba853589dc7f8d3e94f8f9586b2 Gerrit-Change-Number: 26614 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 12 Jan 2022 16:50:06 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • ...
  • 79
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.