Projects
osmocom:master
osmo-hnbgw
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 115
View file
commit_79589556244bf9cea6e8de8793a611f16e9052cd.txt
Added
View file
commit_ca6f6fded95300564ecea2896f328487d349480d.txt
Deleted
View file
osmo-hnbgw_1.6.0.11.ca6f.dsc -> osmo-hnbgw_1.6.0.12.7958.dsc
Changed
@@ -2,7 +2,7 @@ Source: osmo-hnbgw Binary: osmo-hnbgw, osmo-hnbgw-dbg, osmo-hnbgw-doc Architecture: any all -Version: 1.6.0.11.ca6f +Version: 1.6.0.12.7958 Maintainer: Osmocom team <openbsc@lists.osmocom.org> Homepage: https://projects.osmocom.org/projects/osmo-hnbgw Standards-Version: 3.9.8 @@ -14,8 +14,8 @@ osmo-hnbgw-dbg deb debug extra arch=any osmo-hnbgw-doc deb doc optional arch=all Checksums-Sha1: - 8eba464e33e7da45b5d40da7ab6ec21655585019 120156 osmo-hnbgw_1.6.0.11.ca6f.tar.xz + 4cb8918e84e77e857566c39a4cd4803d762b8db3 120492 osmo-hnbgw_1.6.0.12.7958.tar.xz Checksums-Sha256: - 5cdef8a649d39e606a4a0dfe1ed6c17215ed36060288f8eb302057329d7cc788 120156 osmo-hnbgw_1.6.0.11.ca6f.tar.xz + 567acf9636cb5bdaad4a0630be62e370f8771f6e58b8a7714eaf0db47b864bee 120492 osmo-hnbgw_1.6.0.12.7958.tar.xz Files: - 5211c83f257f2594f55f2ca13d0cd90e 120156 osmo-hnbgw_1.6.0.11.ca6f.tar.xz + ec0d283b97091ce2bc1cb36ac2a227aa 120492 osmo-hnbgw_1.6.0.12.7958.tar.xz
View file
osmo-hnbgw_1.6.0.11.ca6f.tar.xz/.tarball-version -> osmo-hnbgw_1.6.0.12.7958.tar.xz/.tarball-version
Changed
@@ -1 +1 @@ -1.6.0.11-ca6f +1.6.0.12-7958
View file
osmo-hnbgw_1.6.0.11.ca6f.tar.xz/debian/changelog -> osmo-hnbgw_1.6.0.12.7958.tar.xz/debian/changelog
Changed
@@ -1,8 +1,8 @@ -osmo-hnbgw (1.6.0.11.ca6f) unstable; urgency=medium +osmo-hnbgw (1.6.0.12.7958) unstable; urgency=medium * Automatically generated changelog entry for building the Osmocom master feed - -- Osmocom OBS scripts <info@osmocom.org> Tue, 29 Oct 2024 12:03:43 +0000 + -- Osmocom OBS scripts <info@osmocom.org> Wed, 30 Oct 2024 23:05:09 +0000 osmo-hnbgw (1.6.0) unstable; urgency=medium
View file
osmo-hnbgw_1.6.0.11.ca6f.tar.xz/include/osmocom/hnbgw/context_map.h -> osmo-hnbgw_1.6.0.12.7958.tar.xz/include/osmocom/hnbgw/context_map.h
Changed
@@ -55,9 +55,18 @@ MAP_SCCP_EV_RX_DATA_INDICATION, /* RUA has received some data from HNB to forward via SCCP to CN. */ MAP_SCCP_EV_TX_DATA_REQUEST, - /* The RAN side received a Disconnect, that means we are going to expect SCCP to disconnect too. - * CN should have received an Iu-ReleaseComplete with or before this, give CN a chance to send an SCCP RLSD; - * after a timeout we will send a non-standard RLSD to the CN instead. */ + /* 3GPP TS 25.468 9.1.5: The RAN side received a RUA Disconnect. + * - Under normal conditions (cause=Normal) the RUA Disconnect contains a RANAP Iu-ReleaseComplete. + * On SCCP, the Iu-ReleaseComplete should still be forwarded as N-Data SCCP Data Form 1), + * and we will expect the CN to send an SCCP RLSD soon. Hence, give CN a chance to send an SCCP RLSD; + * after a timeout we will send a non-standard RLSD to the CN instead. + * - Under error conditions, cause!=Normal and there's no RANAP message. + * In that case, we need to tear down the associated SCCP link towards CN with an RLSD, + * which in turn will tear down the upper layer Iu conn. + * + * Parameter: bool rua_disconnect_err_condition, whether the disconnect + * happened under error or normal conditions, as per the above. + */ MAP_SCCP_EV_RAN_DISC, /* The RAN released ungracefully. We will directly disconnect the SCCP connection, too. */ MAP_SCCP_EV_RAN_LINK_LOST, @@ -127,6 +136,16 @@ /* FSM handling the RUA state for rua_ctx_id. */ struct osmo_fsm_inst *rua_fi; + /* State context related to field rua_fi above: */ + struct { + /* Whether RUA Disconnect received from HNB happened as a normal condition or an error/abnormal condition. + * This is known based on cause and/or RANAP message included in the RUA + * Disconnect message, and tells us whether we should immediately + * terminate the related SCCP session or wait for CN to finish it. + * Defaults to false, only set to true explicitly when needed. */ + bool rua_disconnect_err_condition; + } rua_fi_ctx; + /* Pointer to CN, to transceive SCCP. */ struct hnbgw_cnlink *cnlink; /* SCCP User SAP connection ID used in SCCP messages to/from the cn_link. */
View file
osmo-hnbgw_1.6.0.11.ca6f.tar.xz/src/osmo-hnbgw/context_map_rua.c -> osmo-hnbgw_1.6.0.12.7958.tar.xz/src/osmo-hnbgw/context_map_rua.c
Changed
@@ -287,15 +287,21 @@ return; case MAP_RUA_EV_RX_DISCONNECT: - /* received Disconnect from RUA. forward any payload to SCCP, and change state. */ - if (!map_sccp_is_active(map)) { - /* If, unlikely, the SCCP is already gone, changing to MAP_RUA_ST_DISCONNECTED frees the - * hnbgw_context_map. Avoid a use-after-free. */ - map_rua_fsm_state_chg(MAP_RUA_ST_DISCONNECTED); - return; + /* 3GPP TS 25.468 9.1.5: RUA has disconnected. + * - Under normal conditions (cause=Normal) the RUA Disconnect contains a RANAP Iu-ReleaseComplete. + * On SCCP, the Iu-ReleaseComplete should still be forwarded as N-Data SCCP Data Form 1), + * and we will expect the CN to send an SCCP RLSD soon. + * - Under error conditions, cause!=Normal and there's no RANAP message. + * In that case, we need to tear down the associated SCCP link towards CN, + * which in turn will tear down the upper layer Iu conn. + */ + if (msg_has_l2_data(ranap_msg)) { + /* Forward any payload to SCCP before Disconnect. */ + handle_rx_rua(fi, ranap_msg); + } else { + map->rua_fi_ctx.rua_disconnect_err_condition = true; } map_rua_fsm_state_chg(MAP_RUA_ST_DISCONNECTED); - handle_rx_rua(fi, ranap_msg); return; case MAP_RUA_EV_HNB_LINK_LOST: @@ -315,13 +321,13 @@ } } -static void map_rua_free_if_done(struct hnbgw_context_map *map, uint32_t sccp_event) +static void map_rua_free_if_done(struct hnbgw_context_map *map, uint32_t sccp_event, void *ev_data) { /* From RUA's POV, we can now free the hnbgw_context_map. * If SCCP is still active, tell it to disconnect -- in that case the SCCP side will call context_map_free(). * If SCCP is no longer active, free this map. */ if (map_sccp_is_active(map)) - map_sccp_dispatch(map, sccp_event, NULL); + map_sccp_dispatch(map, sccp_event, ev_data); else context_map_free(map); } @@ -329,7 +335,7 @@ static void map_rua_disconnected_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct hnbgw_context_map *map = fi->priv; - map_rua_free_if_done(map, MAP_SCCP_EV_RAN_DISC); + map_rua_free_if_done(map, MAP_SCCP_EV_RAN_DISC, (void *)map->rua_fi_ctx.rua_disconnect_err_condition); } static void map_rua_disconnected_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) @@ -343,7 +349,7 @@ static void map_rua_disrupted_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct hnbgw_context_map *map = fi->priv; - map_rua_free_if_done(map, MAP_SCCP_EV_RAN_LINK_LOST); + map_rua_free_if_done(map, MAP_SCCP_EV_RAN_LINK_LOST, NULL); } void map_rua_fsm_cleanup(struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause)
View file
osmo-hnbgw_1.6.0.11.ca6f.tar.xz/src/osmo-hnbgw/context_map_sccp.c -> osmo-hnbgw_1.6.0.12.7958.tar.xz/src/osmo-hnbgw/context_map_sccp.c
Changed
@@ -349,26 +349,40 @@ static void map_sccp_connected_action(struct osmo_fsm_inst *fi, uint32_t event, void *data) { - struct msgb *ranap_msg = data; + struct msgb *ranap_msg; + bool rua_disconnect_err_condition; switch (event) { case MAP_SCCP_EV_RX_DATA_INDICATION: + ranap_msg = data; /* forward RANAP from SCCP to RUA */ handle_rx_sccp(fi, ranap_msg); return; case MAP_SCCP_EV_TX_DATA_REQUEST: + ranap_msg = data; /* Someone (usually the RUA side) wants us to send a RANAP payload to CN via SCCP */ tx_sccp_df1(fi, ranap_msg); return; case MAP_SCCP_EV_RAN_DISC: - /* RUA has disconnected, and usually has sent an Iu-ReleaseComplete along with its RUA Disconnect. On - * SCCP, the Iu-ReleaseComplete should still be forwarded as N-Data (SCCP Data Form 1), and we will - * expect the CN to send an SCCP RLSD soon. */ - map_sccp_fsm_state_chg(MAP_SCCP_ST_WAIT_RLSD); - tx_sccp_df1(fi, ranap_msg); + rua_disconnect_err_condition = !!data; + /* 3GPP TS 25.468 9.1.5: RUA has disconnected. + * - Under normal conditions (cause=Normal) the RUA Disconnect + * contained a RANAP Iu-ReleaseComplete which we already + * handled here through MAP_SCCP_EV_TX_DATA_REQUEST. + * On SCCP, We will expect the CN to send an SCCP RLSD soon. + * - Under error conditions, cause!=Normal and there was no RANAP message. + * In that case, we need to tear down the associated SCCP link towards CN, + * which in turn will tear down the upper layer Iu conn. + */ + if (rua_disconnect_err_condition) { + tx_sccp_rlsd(fi); + map_sccp_fsm_state_chg(MAP_SCCP_ST_DISCONNECTED); + } else { + map_sccp_fsm_state_chg(MAP_SCCP_ST_WAIT_RLSD); + } return; case MAP_SCCP_EV_RAN_LINK_LOST: @@ -377,6 +391,7 @@ case MAP_SCCP_EV_USER_ABORT: /* The user is asking for disconnection, so there is no Iu Release in progress. Disconnect now. */ case MAP_SCCP_EV_CN_LINK_LOST: + ranap_msg = data; /* The CN peer has sent a RANAP RESET, so the old link that this map ran on is lost */ /* There won't be any ranap_msg, but if a caller wants to dispatch a msg, forward it before @@ -387,6 +402,7 @@ return; case MAP_SCCP_EV_RX_RELEASED: + ranap_msg = data; /* The CN sends an N-Disconnect (SCCP Released) out of the usual sequence. Not what we expected, but * handle it. */ LOGPFSML(fi, LOGL_ERROR, "CN sends SCCP Released sooner than expected\n"); @@ -395,6 +411,7 @@ return; case MAP_SCCP_EV_RX_CONNECTION_CONFIRM: + ranap_msg = data; /* Already connected. Unusual, but if there is data just forward it. */ LOGPFSML(fi, LOGL_ERROR, "Already connected, but received SCCP CC again\n"); handle_rx_sccp(fi, ranap_msg);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.