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

February 2023

  • 1 participants
  • 2601 discussions
Change in osmo-hnbgw[master]: Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code
by fixeria 15 Feb '23

15 Feb '23
Attention is currently required from: neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326 ) Change subject: Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I18dece84b33bbefce8617fbb0b2d79a7e5adb263 Gerrit-Change-Number: 31326 Gerrit-PatchSet: 2 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-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Feb 2023 10:16:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR
by fixeria 15 Feb '23

15 Feb '23
Attention is currently required from: neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31327 ) Change subject: hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31327 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: I174b2ce06a31daa5a129c8a39099fe8962092df8 Gerrit-Change-Number: 31327 Gerrit-PatchSet: 1 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-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Feb 2023 10:15:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-hnbgw[master]: Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code
by pespin 15 Feb '23

15 Feb '23
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326 ) Change subject: Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I18dece84b33bbefce8617fbb0b2d79a7e5adb263 Gerrit-Change-Number: 31326 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Feb 2023 09:11:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR
by pespin 15 Feb '23

15 Feb '23
Attention is currently required from: neels. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31327 ) Change subject: hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31327 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: I174b2ce06a31daa5a129c8a39099fe8962092df8 Gerrit-Change-Number: 31327 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Wed, 15 Feb 2023 09:08:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-hnbgw[master]: Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code
by neels 15 Feb '23

15 Feb '23
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326 ) Change subject: Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code ...................................................................... Patch Set 2: (1 comment) This change is ready for review. Patchset: PS2: I figured it out, see 'Depends:' in commit log -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I18dece84b33bbefce8617fbb0b2d79a7e5adb263 Gerrit-Change-Number: 31326 Gerrit-PatchSet: 2 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Wed, 15 Feb 2023 02:37:05 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR
by neels 15 Feb '23

15 Feb '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31327 ) Change subject: hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR ...................................................................... hnbgw: initial_ue_empty_cr: use larger payload to trigger empty SCCP CR osmo-hnbgw will deprecate the 'sccp cr max-payload-len' config option. To still trigger the 130 byte limit that is now enforced in libosmo-sigtran, enlarge the NAS PDU. So far the limit set via VTY was 0 bytes, which will no longer happen in osmo-hnbgw after I18dece84b33bbefce8617fbb0b2d79a7e5adb263. Related: OS#5906 SYS#5968 Change-Id: I174b2ce06a31daa5a129c8a39099fe8962092df8 --- M hnbgw/HNBGW_Tests.ttcn 1 file changed, 9 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/27/31327/1 diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index eb7fad0..2aa6407 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -612,7 +612,15 @@ sAC := int2oct(pars.hnb.sac, 2), iE_Extensions := omit } - var octetstring nas := f_rnd_octstring(10); + var octetstring nas; + if (pars.separate_sccp_cr) { + /* SCCP CR has a payload length limit of 130 bytes. To trigger this limit, the RANAP + NAS PDU has to be + * > 130 bytes. It doesn't need to be 131 bytes in the NAS PDU alone, but let's just make it definitely + * large enough. */ + nas := f_rnd_octstring(131); + } else { + nas := f_rnd_octstring(10); + } var IuSignallingConnectionIdentifier sigc_id := int2bit(f_rnd_int(1000), 24); var GlobalRNC_ID grnc_id := { pLMNidentity := lai.pLMNidentity, -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31327 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: I174b2ce06a31daa5a129c8a39099fe8962092df8 Gerrit-Change-Number: 31327 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-hnbgw[master]: Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code
by neels 15 Feb '23

15 Feb '23
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326 ) Change subject: Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code ...................................................................... Deprecate 'sccp cr max-payload-len', remove SCCP CR limit code The SCCP CR payload length limit is now implemented in libosmo-sigtran v1.7.0. The limit no longer needs to be enforced in osmo-hnbgw. This reverts commit 2c91bd66a1dc4740282c9f8221f80da0d688a293, except for keeping the cfg option, marked deprecated, and not doing anything. Fixes: OS#5906 Related: SYS#5968 Related: OS#5579 Change-Id: I18dece84b33bbefce8617fbb0b2d79a7e5adb263 --- M TODO-RELEASE M include/osmocom/hnbgw/context_map.h M include/osmocom/hnbgw/hnbgw.h M include/osmocom/hnbgw/hnbgw_rua.h M src/osmo-hnbgw/context_map.c M src/osmo-hnbgw/hnbgw.c M src/osmo-hnbgw/hnbgw_cn.c M src/osmo-hnbgw/hnbgw_rua.c M src/osmo-hnbgw/hnbgw_vty.c 9 files changed, 22 insertions(+), 115 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/26/31326/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index d0852fc..84cc2ea 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +osmo-hnbgw cfg config deprecated: 'sccp cr max-payload-len <0-999999>' +libosmo-sigtran >=1.7.0 Ensure SCCP CR max payload length of 130 bytes is enforced. diff --git a/include/osmocom/hnbgw/context_map.h b/include/osmocom/hnbgw/context_map.h index fe09da0..a8d1f97 100644 --- a/include/osmocom/hnbgw/context_map.h +++ b/include/osmocom/hnbgw/context_map.h @@ -2,9 +2,6 @@ #include <stdint.h> #include <osmocom/core/linuxlist.h> -#include <osmocom/rua/RUA_CN-DomainIndicator.h> - -struct msgb; #define LOG_MAP(HNB_CTX_MAP, SUBSYS, LEVEL, FMT, ARGS...) \ LOGHNB((HNB_CTX_MAP) ? (HNB_CTX_MAP)->hnb_ctx : NULL, \ @@ -47,9 +44,6 @@ * User SAP conn. Useful to avoid leaking SCCP connections: guarantee that an OSMO_SCU_PRIM_N_DISCONNECT gets * sent, even when RUA fails to gracefully disconnect. */ bool scu_conn_active; - /* Pending data to be sent: when we send an "empty" SCCP CR first, the initial RANAP message will be sent in a - * separate DT once the CR is confirmed. This caches the initial RANAP message. */ - struct msgb *cached_msg; enum hnbgw_context_map_state state; @@ -80,8 +74,6 @@ struct hnbgw_context_map * context_map_by_cn(struct hnbgw_cnlink *cn, uint32_t scu_conn_id); -int context_map_send_cached_msg(struct hnbgw_context_map *map); - void context_map_deactivate(struct hnbgw_context_map *map); int context_map_init(struct hnb_gw *gw); diff --git a/include/osmocom/hnbgw/hnbgw.h b/include/osmocom/hnbgw/hnbgw.h index ed18ca4..f1b107e 100644 --- a/include/osmocom/hnbgw/hnbgw.h +++ b/include/osmocom/hnbgw/hnbgw.h @@ -136,7 +136,6 @@ bool hnbap_allow_tmsi; /*! print hnb-id (true) or MCC-MNC-LAC-RAC-SAC (false) in logs */ bool log_prefix_hnb_id; - unsigned int max_sccp_cr_payload_len; struct mgcp_client_conf *mgcp_client; struct { char *local_addr; @@ -193,8 +192,6 @@ void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); int hnbgw_vty_go_parent(struct vty *vty); -bool hnbgw_requires_empty_sccp_cr(struct hnb_gw *gw, unsigned int ranap_msg_len); - /* Return true when the user configured GTP mapping to be enabled, by configuring a PFCP link to a UPF. * Return false when the user configured to skip GTP mapping and RANAP PS RAB Requests/Responses should be passed thru * 1:1. diff --git a/include/osmocom/hnbgw/hnbgw_rua.h b/include/osmocom/hnbgw/hnbgw_rua.h index fa33d6b..4b65115 100644 --- a/include/osmocom/hnbgw/hnbgw_rua.h +++ b/include/osmocom/hnbgw/hnbgw_rua.h @@ -2,7 +2,6 @@ #include <osmocom/hnbgw/hnbgw.h> #include <osmocom/rua/RUA_Cause.h> -#include <osmocom/rua/RUA_CN-DomainIndicator.h> int hnbgw_rua_rx(struct hnb_context *hnb, struct msgb *msg); int hnbgw_rua_init(void); @@ -12,9 +11,3 @@ const uint8_t *data, unsigned int len); int rua_tx_disc(struct hnb_context *hnb, int is_ps, uint32_t context_id, const RUA_Cause_t *cause, const uint8_t *data, unsigned int len); - -int rua_to_scu(struct hnb_context *hnb, - RUA_CN_DomainIndicator_t cN_DomainIndicator, - enum osmo_scu_prim_type type, - uint32_t context_id, uint32_t cause, - const uint8_t *data, unsigned int len); diff --git a/src/osmo-hnbgw/context_map.c b/src/osmo-hnbgw/context_map.c index 31ba032..39b9b50 100644 --- a/src/osmo-hnbgw/context_map.c +++ b/src/osmo-hnbgw/context_map.c @@ -29,7 +29,6 @@ #include <osmocom/sigtran/sccp_helpers.h> #include <osmocom/hnbgw/hnbgw.h> -#include <osmocom/hnbgw/hnbgw_rua.h> #include <osmocom/hnbgw/context_map.h> #include <osmocom/hnbgw/mgw_fsm.h> #include <osmocom/hnbgw/ps_rab_ass_fsm.h> @@ -151,20 +150,6 @@ return NULL; } -int context_map_send_cached_msg(struct hnbgw_context_map *map) -{ - int rc; - if (!map || !map->cached_msg) - return 0; - rc = rua_to_scu(map->hnb_ctx, - map->is_ps ? RUA_CN_DomainIndicator_ps_domain : RUA_CN_DomainIndicator_cs_domain, - OSMO_SCU_PRIM_N_DATA, map->rua_ctx_id, 0, - msgb_data(map->cached_msg), msgb_length(map->cached_msg)); - msgb_free(map->cached_msg); - map->cached_msg = NULL; - return rc; -} - void context_map_deactivate(struct hnbgw_context_map *map) { LOG_MAP(map, DMAIN, LOGL_INFO, "Deactivating\n"); diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c index 3a6879e..da6df43 100644 --- a/src/osmo-hnbgw/hnbgw.c +++ b/src/osmo-hnbgw/hnbgw.c @@ -94,10 +94,6 @@ gw->config.iuh_local_port = IUH_DEFAULT_SCTP_PORT; gw->config.log_prefix_hnb_id = true; - /* No limit by default, always include the initial RANAP message in the SCCP CR towards the CN. - * 999999 is the maximum value in hnbgw_vty.c */ - gw->config.max_sccp_cr_payload_len = 999999; - gw->next_ue_ctx_id = 23; INIT_LLIST_HEAD(&gw->hnb_list); INIT_LLIST_HEAD(&gw->ue_list); @@ -431,11 +427,6 @@ talloc_free(ctx); } -bool hnbgw_requires_empty_sccp_cr(struct hnb_gw *gw, unsigned int ranap_msg_len) -{ - return ranap_msg_len > gw->config.max_sccp_cr_payload_len; -} - /*! call-back when the listen FD has something to read */ static int accept_cb(struct osmo_stream_srv_link *srv, int fd) { diff --git a/src/osmo-hnbgw/hnbgw_cn.c b/src/osmo-hnbgw/hnbgw_cn.c index c4189e8..4c0e685 100644 --- a/src/osmo-hnbgw/hnbgw_cn.c +++ b/src/osmo-hnbgw/hnbgw_cn.c @@ -355,11 +355,6 @@ /* SCCP connection is confirmed. Mark conn as active, i.e. requires a DISCONNECT to clean up the SCCP * connection. */ map->scu_conn_active = true; - - /* If our initial SCCP CR was sent without data payload, then the initial RANAP message is cached and waiting to - * be sent as soon as the SCCP connection is confirmed. See if that is the case, send cached data. */ - context_map_send_cached_msg(map); - return 0; } diff --git a/src/osmo-hnbgw/hnbgw_rua.c b/src/osmo-hnbgw/hnbgw_rua.c index 2757073..07b78b3 100644 --- a/src/osmo-hnbgw/hnbgw_rua.c +++ b/src/osmo-hnbgw/hnbgw_rua.c @@ -179,11 +179,11 @@ /* forward a RUA message to the SCCP User API to SCCP */ -int rua_to_scu(struct hnb_context *hnb, - RUA_CN_DomainIndicator_t cN_DomainIndicator, - enum osmo_scu_prim_type type, - uint32_t context_id, uint32_t cause, - const uint8_t *data, unsigned int len) +static int rua_to_scu(struct hnb_context *hnb, + RUA_CN_DomainIndicator_t cN_DomainIndicator, + enum osmo_scu_prim_type type, + uint32_t context_id, uint32_t cause, + const uint8_t *data, unsigned int len) { struct msgb *msg; struct osmo_scu_prim *prim; @@ -227,9 +227,9 @@ default: map = context_map_alloc_by_hnb(hnb, context_id, is_ps, cn); OSMO_ASSERT(map); - LOGHNB(hnb, DRUA, LOGL_DEBUG, "rua_to_scu() %s to %s, rua_ctx_id %u scu_conn_id %u data-len %u\n", + LOGHNB(hnb, DRUA, LOGL_DEBUG, "rua_to_scu() %s to %s, rua_ctx_id %u scu_conn_id %u\n", cn_domain_indicator_to_str(cN_DomainIndicator), osmo_sccp_addr_dump(remote_addr), - map->rua_ctx_id, map->scu_conn_id, len); + map->rua_ctx_id, map->scu_conn_id); } /* add primitive header */ @@ -388,69 +388,21 @@ struct hnb_context *hnb = msg->dst; uint32_t context_id; int rc; - const uint8_t *data; - unsigned int data_len; rc = rua_decode_connecties(&ies, in); if (rc < 0) return rc; context_id = asn1bitstr_to_u24(&ies.context_ID); - data = ies.ranaP_Message.buf; - data_len = ies.ranaP_Message.size; - LOGHNB(hnb, DRUA, LOGL_DEBUG, "RUA %s Connect.req(ctx=0x%x, %s, RANAP.size=%u)\n", - cn_domain_indicator_to_str(ies.cN_DomainIndicator), context_id, - ies.establishment_Cause == RUA_Establishment_Cause_emergency_call ? "emergency" : "normal", - data_len); - - if (hnbgw_requires_empty_sccp_cr(hnb->gw, data_len)) { - /* Do not include data in the SCCP CR, to avoid hitting a message size limit at the remote end that may - * lead to rejection. */ - bool is_ps; - struct osmo_sccp_addr *remote_addr; - struct hnbgw_context_map *map; - - switch (ies.cN_DomainIndicator) { - case RUA_CN_DomainIndicator_cs_domain: - remote_addr = &hnb->gw->sccp.iucs_remote_addr; - is_ps = false; - break; - case RUA_CN_DomainIndicator_ps_domain: - remote_addr = &hnb->gw->sccp.iups_remote_addr; - is_ps = true; - break; - default: - LOGHNB(hnb, DRUA, LOGL_ERROR, "Unsupported Domain %ld\n", ies.cN_DomainIndicator); - rua_free_connecties(&ies); - return -1; - } - - if (!hnb->gw->sccp.cnlink) { - LOGHNB(hnb, DRUA, LOGL_NOTICE, "CN=NULL, discarding message\n"); - rua_free_connecties(&ies); - return 0; - } - - map = context_map_alloc_by_hnb(hnb, context_id, is_ps, hnb->gw->sccp.cnlink); - OSMO_ASSERT(map); - OSMO_ASSERT(map->is_ps == is_ps); - LOGHNB(hnb, DRUA, LOGL_DEBUG, "rua_rx_init_connect() %s to %s, rua_ctx_id %u scu_conn_id %u;" - " Sending SCCP CR without payload, caching %u octets\n", - cn_domain_indicator_to_str(ies.cN_DomainIndicator), osmo_sccp_addr_dump(remote_addr), - map->rua_ctx_id, map->scu_conn_id, data_len); - - map->cached_msg = msgb_alloc_c(map, data_len, "map.cached_msg"); - OSMO_ASSERT(map->cached_msg); - memcpy(msgb_put(map->cached_msg, data_len), data, data_len); - - /* Data is cached for after CR is confirmed, send SCCP CR but omit payload. */ - data = NULL; - data_len = 0; - } + LOGHNB(hnb, DRUA, LOGL_DEBUG, "RUA %s Connect.req(ctx=0x%x, %s)\n", + cn_domain_indicator_to_str(ies.cN_DomainIndicator), context_id, + ies.establishment_Cause == RUA_Establishment_Cause_emergency_call ? "emergency" : "normal"); rc = rua_to_scu(hnb, ies.cN_DomainIndicator, OSMO_SCU_PRIM_N_CONNECT, - context_id, 0, data, data_len); + context_id, 0, ies.ranaP_Message.buf, + ies.ranaP_Message.size); + rua_free_connecties(&ies); return rc; diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c index 5c2c42d..abddc79 100644 --- a/src/osmo-hnbgw/hnbgw_vty.c +++ b/src/osmo-hnbgw/hnbgw_vty.c @@ -332,15 +332,17 @@ return CMD_SUCCESS; } -DEFUN(cfg_hnbgw_max_sccp_cr_payload_len, cfg_hnbgw_max_sccp_cr_payload_len_cmd, +DEFUN_DEPRECATED(cfg_hnbgw_max_sccp_cr_payload_len, cfg_hnbgw_max_sccp_cr_payload_len_cmd, "sccp cr max-payload-len <0-999999>", "Configure SCCP behavior\n" "Configure SCCP Connection Request\n" - "Set an upper bound for payload data length included directly in the CR. If an initial RUA message has a" - " RANAP payload larger than this value (octets), send an SCCP CR without data, followed by an SCCP DT." - " This may be necessary if the remote component has a size limit on valid SCCP CR messages.\n") + "DEPRECATED: The maximum SCCP CR PDU length of 130 is now enforced in libosmo-sccp v1.7.0. This config item no" + " longer has any effect.\n" + "ignored\n") { - g_hnb_gw->config.max_sccp_cr_payload_len = atoi(argv[0]); + vty_out(vty, "%% deprecated, ignored: remove this from your config file: 'sccp cr max-payload-len N'%s", + VTY_NEWLINE); + /* Still return success to not break osmo-hnbgw startup for users with old config files. */ return CMD_SUCCESS; } @@ -414,8 +416,6 @@ vty_out(vty, "hnbgw%s", VTY_NEWLINE); vty_out(vty, " log-prefix %s%s", g_hnb_gw->config.log_prefix_hnb_id ? "hnb-id" : "umts-cell-id", VTY_NEWLINE); - if (g_hnb_gw->config.max_sccp_cr_payload_len != 999999) - vty_out(vty, " sccp cr max-payload-len %u%s", g_hnb_gw->config.max_sccp_cr_payload_len, VTY_NEWLINE); osmo_tdef_vty_groups_write(vty, " "); return CMD_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31326 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I18dece84b33bbefce8617fbb0b2d79a7e5adb263 Gerrit-Change-Number: 31326 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-hnbgw[master]: UE state leak: when HNB re-registers, discard previous UE state
by neels 14 Feb '23

14 Feb '23
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/31293 ) Change subject: UE state leak: when HNB re-registers, discard previous UE state ...................................................................... UE state leak: when HNB re-registers, discard previous UE state User reports show leaked UE contexts over time, in a scenario where HNB regularly disconnect and reconnect. So far, when we receive a HNB REGISTER REQ, we log as "duplicated" and continue to use the hnb_context unchanged. But it seems obvious that a HNB that registers does not expect any UE state to remain. It will obviously not tear down UE contexts (HNBAP or RUA) that have been established before the HNB REGISTER REQUEST. These hence remain in osmo-hnbgw indefinitely. When receiving a HNB REGISTER REQUEST, release all its previous UE state. Allow the HNB to register with a clean slate. The aim is to alleviate the observed build-up of apparently orphaned UE contexts, in order to avoid gradual memory exhaustion. Related: SYS#6297 Change-Id: I7fa8a04cc3b2dfba263bda5b410961c77fbed332 --- M include/osmocom/hnbgw/hnbgw.h M src/osmo-hnbgw/hnbgw.c M src/osmo-hnbgw/hnbgw_hnbap.c 3 files changed, 21 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved diff --git a/include/osmocom/hnbgw/hnbgw.h b/include/osmocom/hnbgw/hnbgw.h index 8adefea..ed18ca4 100644 --- a/include/osmocom/hnbgw/hnbgw.h +++ b/include/osmocom/hnbgw/hnbgw.h @@ -188,6 +188,7 @@ struct hnb_context *hnb_context_alloc(struct hnb_gw *gw, struct osmo_stream_srv_link *link, int new_fd); void hnb_context_release(struct hnb_context *ctx); +void hnb_context_release_ue_state(struct hnb_context *ctx); void hnbgw_vty_init(struct hnb_gw *gw, void *tall_ctx); int hnbgw_vty_go_parent(struct vty *vty); diff --git a/src/osmo-hnbgw/hnbgw.c b/src/osmo-hnbgw/hnbgw.c index 5dba1e3..3a6879e 100644 --- a/src/osmo-hnbgw/hnbgw.c +++ b/src/osmo-hnbgw/hnbgw.c @@ -395,15 +395,10 @@ return umts_cell_id_name(&ctx->id); } -void hnb_context_release(struct hnb_context *ctx) +void hnb_context_release_ue_state(struct hnb_context *ctx) { struct hnbgw_context_map *map, *map2; - LOGHNB(ctx, DMAIN, LOGL_INFO, "Releasing HNB context\n"); - - /* remove from the list of HNB contexts */ - llist_del(&ctx->list); - /* deactivate all context maps */ llist_for_each_entry_safe(map, map2, &ctx->map_list, hnb_list) { /* remove it from list, as HNB context will soon be @@ -414,6 +409,16 @@ context_map_deactivate(map); } ue_context_free_by_hnb(ctx->gw, ctx); +} + +void hnb_context_release(struct hnb_context *ctx) +{ + LOGHNB(ctx, DMAIN, LOGL_INFO, "Releasing HNB context\n"); + + /* remove from the list of HNB contexts */ + llist_del(&ctx->list); + + hnb_context_release_ue_state(ctx); if (ctx->conn) { /* we own a conn, we must free it: */ LOGHNB(ctx, DMAIN, LOGL_INFO, "Closing HNB SCTP connection %s\n", diff --git a/src/osmo-hnbgw/hnbgw_hnbap.c b/src/osmo-hnbgw/hnbgw_hnbap.c index 4aefe2b..19ebd38 100644 --- a/src/osmo-hnbgw/hnbgw_hnbap.c +++ b/src/osmo-hnbgw/hnbgw_hnbap.c @@ -467,7 +467,15 @@ LOGHNB(ctx, DHNBAP, LOGL_DEBUG, "HNB-REGISTER-REQ %s MCC=%u,MNC=%u,LAC=%u,RAC=%u,SAC=%u,CID=%u from %s%s\n", ctx->identity_info, ctx->id.mcc, ctx->id.mnc, ctx->id.lac, ctx->id.rac, ctx->id.sac, ctx->id.cid, - name, ctx->hnb_registered ? " (duplicated)" : ""); + name, ctx->hnb_registered ? " (re-connecting)" : ""); + + if (ctx->hnb_registered) { + /* The HNB is already registered, and we are seeing a new HNB Register Request. The HNB has restarted + * without us noticing. Clearly, the HNB does not expect any UE state to be active here, so discard any + * UE contexts and SCCP connections associated with this HNB. */ + LOGHNB(ctx, DHNBAP, LOGL_NOTICE, "HNB reconnecting, discarding all previous UE state\n"); + hnb_context_release_ue_state(ctx); + } ctx->hnb_registered = true; -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/31293 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: I7fa8a04cc3b2dfba263bda5b410961c77fbed332 Gerrit-Change-Number: 31293 Gerrit-PatchSet: 1 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: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in libosmo-abis[master]: Reworked mi_e1_line_update() and some of its sub routines
by neels 14 Feb '23

14 Feb '23
Attention is currently required from: jolly. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31296 ) Change subject: Reworked mi_e1_line_update() and some of its sub routines ...................................................................... Patch Set 3: (1 comment) Commit Message: https://gerrit.osmocom.org/c/libosmo-abis/+/31296/comment/03ab1ac9_5b70e650 PS3, Line 7: Reworked mi_e1_line_update() and some of its sub routines (btw, it is a good practice to write commit logs in "imperative form", shortest and most clear. No need to change this, maybe for future logs... https://git.kernel.org/pub/scm/git/git.git/tree/Documentation/SubmittingPat… https://initialcommit.com/blog/Git-Commit-Message-Imperative-Mood ) -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Iab0776fce6921661b39e9e53376cf01a80bcd42c Gerrit-Change-Number: 31296 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Tue, 14 Feb 2023 21:13:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-abis[master]: Reworked mi_e1_line_update() and some of its sub routines
by neels 14 Feb '23

14 Feb '23
Attention is currently required from: jolly. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/31296 ) Change subject: Reworked mi_e1_line_update() and some of its sub routines ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/31296 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Iab0776fce6921661b39e9e53376cf01a80bcd42c Gerrit-Change-Number: 31296 Gerrit-PatchSet: 3 Gerrit-Owner: jolly <andreas(a)eversberg.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: jolly <andreas(a)eversberg.eu> Gerrit-Comment-Date: Tue, 14 Feb 2023 21:04:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • ...
  • 261
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.