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 2025

  • 1 participants
  • 1491 discussions
[M] Change in osmo-iuh[master]: iu_client: add ranap_iu_page_cs2/ranap_iu_page_ps2
by lynxis lazus 07 Jan '25

07 Jan '25
Attention is currently required from: pespin. lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email ) Change subject: iu_client: add ranap_iu_page_cs2/ranap_iu_page_ps2 ...................................................................... Patch Set 3: (1 comment) File src/iu_client.c: https://gerrit.osmocom.org/c/osmo-iuh/+/38946/comment/9c906667_8b93e350?usp… : PS3, Line 901: }; > I really fail to see why do you say two RNCs can't share a LAI, or have same LAI but different RAC. […] Good question. I thought it is implicit, that an RNC serves the single LAC, but it doesn't seem to be a requirement. So yes, we should need a loop in here, which iterates over all RNCs and transmit a paging out. -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38946?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I1f07e96642737160d387de3e4c3f71d288d356dd Gerrit-Change-Number: 38946 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 07 Jan 2025 17:14:09 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[S] Change in osmo-iuh[master]: iu_client: add a new event NEW_LAC_RAC
by lynxis lazus 07 Jan '25

07 Jan '25
Attention is currently required from: pespin. lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-iuh/+/38947?usp=email ) Change subject: iu_client: add a new event NEW_LAC_RAC ...................................................................... Patch Set 3: (1 comment) File include/osmocom/ranap/iu_client.h: https://gerrit.osmocom.org/c/osmo-iuh/+/38947/comment/3b79a558_f34f8713?usp… : PS3, Line 50: RANAP_IU_EVENT_NEW_LAC_RAC, /* Either a new LAC/RAC has been detected */ > Have a look at struct gsm0808_cell_id. Not saying you must use it, but worth a thought. […] Btw. iu_client is also somehow deprecated. Because it abstractions are not well designed. For this reason neels already rewritten the MSC code to not use iu_client. But currently I don't want to replace it. Too much changing parts already. Yes maybe we can use gsm0808_cell_id_u. But currently I would rather go with this approach. It is not the best approach (rewrite ;) but having at least some information would be sufficient IMHO. -- To view, visit https://gerrit.osmocom.org/c/osmo-iuh/+/38947?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-iuh Gerrit-Branch: master Gerrit-Change-Id: I8b1b8c58bf72b00e2705ca87a89a91481bac3470 Gerrit-Change-Number: 38947 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 07 Jan 2025 16:45:53 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[S] Change in osmo-sgsn[master]: Add include prefix for all libgtp related includes
by lynxis lazus 07 Jan '25

07 Jan '25
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39244?usp=email ) Change subject: Add include prefix for all libgtp related includes ...................................................................... Add include prefix for all libgtp related includes The libgtp includes contain all the prefix osmocom/gtp. The old non-prefix was used in the old OpenGGSN code base. Change-Id: I5ea50c9766f719e1eea89cbf6783fafc2093773d --- M src/gtphub/gtphub.c M src/sgsn/gprs_gmm.c M src/sgsn/gprs_ranap.c M src/sgsn/mmctx.c M src/sgsn/sgsn.c M src/sgsn/sgsn_cdr.c M src/sgsn/sgsn_ctrl.c M src/sgsn/sgsn_libgtp.c M src/sgsn/sgsn_main.c M src/sgsn/sgsn_vty.c M tests/gtphub/gtphub_test.c 11 files changed, 26 insertions(+), 22 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/44/39244/1 diff --git a/src/gtphub/gtphub.c b/src/gtphub/gtphub.c index 937e6a4..b09f9cb 100644 --- a/src/gtphub/gtphub.c +++ b/src/gtphub/gtphub.c @@ -29,8 +29,8 @@ #include <netinet/in.h> #include <arpa/inet.h> -#include <gtp.h> -#include <gtpie.h> +#include <osmocom/gtp/gtp.h> +#include <osmocom/gtp/gtpie.h> #include <osmocom/gtphub/gtphub.h> #include <osmocom/sgsn/debug.h> diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 5ed190b..84b7f12 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -44,6 +44,8 @@ #include <osmocom/crypt/utran_cipher.h> #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> +#include <osmocom/gtp/pdp.h> + #include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/sgsn/debug.h> @@ -65,8 +67,6 @@ #include <osmocom/sgsn/pdpctx.h> #include <osmocom/sgsn/gprs_gmm_util.h> -#include <pdp.h> - #define PTMSI_ALLOC diff --git a/src/sgsn/gprs_ranap.c b/src/sgsn/gprs_ranap.c index b652cb5..af764de 100644 --- a/src/sgsn/gprs_ranap.c +++ b/src/sgsn/gprs_ranap.c @@ -22,7 +22,7 @@ */ #include "config.h" -#include <gtp.h> +#include <osmocom/gtp/gtp.h> #include <osmocom/core/rate_ctr.h> #include <osmocom/core/tdef.h> diff --git a/src/sgsn/mmctx.c b/src/sgsn/mmctx.c index ae73320..40f902b 100644 --- a/src/sgsn/mmctx.c +++ b/src/sgsn/mmctx.c @@ -36,6 +36,8 @@ #include <osmocom/gsm/gsm_utils.h> #include <osmocom/gsm/gsup.h> +#include <osmocom/gtp/pdp.h> + #include <osmocom/sgsn/gprs_subscriber.h> #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/mmctx.h> @@ -54,8 +56,6 @@ #include <osmocom/sgsn/gtp.h> #include <osmocom/sgsn/pdpctx.h> -#include <pdp.h> - #include <time.h> #include "../../config.h" diff --git a/src/sgsn/sgsn.c b/src/sgsn/sgsn.c index 1c637b3..4ebba26 100644 --- a/src/sgsn/sgsn.c +++ b/src/sgsn/sgsn.c @@ -39,6 +39,8 @@ #include <osmocom/crypt/gprs_cipher.h> #include <osmocom/crypt/utran_cipher.h> +#include <osmocom/gtp/pdp.h> + #include <osmocom/sgsn/gprs_subscriber.h> #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/sgsn.h> @@ -57,8 +59,6 @@ #include <osmocom/sgsn/pdpctx.h> #include <osmocom/sgsn/gprs_routing_area.h> -#include <pdp.h> - #include <time.h> #define GPRS_LLME_CHECK_TICK 30 diff --git a/src/sgsn/sgsn_cdr.c b/src/sgsn/sgsn_cdr.c index 1979d92..b3656a8 100644 --- a/src/sgsn/sgsn_cdr.c +++ b/src/sgsn/sgsn_cdr.c @@ -20,6 +20,9 @@ #include <osmocom/ctrl/control_if.h> +#include <osmocom/gtp/gtp.h> +#include <osmocom/gtp/pdp.h> + #include <osmocom/sgsn/sgsn.h> #include <osmocom/sgsn/signal.h> #include <osmocom/sgsn/gprs_utils.h> @@ -31,9 +34,6 @@ #include <osmocom/sgsn/pdpctx.h> #include <osmocom/sgsn/mmctx.h> -#include <gtp.h> -#include <pdp.h> - #include <arpa/inet.h> #include <time.h> diff --git a/src/sgsn/sgsn_ctrl.c b/src/sgsn/sgsn_ctrl.c index 069304a..245d6fd 100644 --- a/src/sgsn/sgsn_ctrl.c +++ b/src/sgsn/sgsn_ctrl.c @@ -21,12 +21,14 @@ #include <osmocom/ctrl/control_if.h> #include <osmocom/ctrl/control_cmd.h> + +#include <osmocom/gtp/pdp.h> + #include <osmocom/sgsn/mmctx.h> #include <osmocom/sgsn/pdpctx.h> #include <osmocom/sgsn/sgsn.h> #include <osmocom/sgsn/debug.h> -#include <pdp.h> static int get_subscriber_list(struct ctrl_cmd *cmd, void *d) { diff --git a/src/sgsn/sgsn_libgtp.c b/src/sgsn/sgsn_libgtp.c index 3c35c78..af64738 100644 --- a/src/sgsn/sgsn_libgtp.c +++ b/src/sgsn/sgsn_libgtp.c @@ -42,6 +42,9 @@ #include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> +#include <osmocom/gtp/gtp.h> +#include <osmocom/gtp/pdp.h> + #include <osmocom/sgsn/signal.h> #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/sgsn.h> @@ -63,9 +66,6 @@ #include <osmocom/sgsn/gprs_bssgp.h> #include <osmocom/sgsn/pdpctx.h> -#include <gtp.h> -#include <pdp.h> - /* TS 23.003: The MSISDN shall take the dummy MSISDN value composed of * 15 digits set to 0 (encoded as an E.164 international number) when * the MSISDN is not available in messages in which the presence of the diff --git a/src/sgsn/sgsn_main.c b/src/sgsn/sgsn_main.c index 86c3561..320842d 100644 --- a/src/sgsn/sgsn_main.c +++ b/src/sgsn/sgsn_main.c @@ -45,6 +45,8 @@ #include <osmocom/gprs/gprs_bssgp.h> #include <osmocom/gprs/gprs_bssgp_bss.h> +#include <osmocom/gtp/gtp.h> + #include <osmocom/vty/telnet_interface.h> #include <osmocom/vty/logging.h> #include <osmocom/vty/stats.h> @@ -68,7 +70,6 @@ #include <osmocom/sgsn/gprs_subscriber.h> #include <osmocom/sgsn/gtp.h> -#include <gtp.h> #include <osmocom/sgsn/sgsn_rim.h> #include "../../config.h" diff --git a/src/sgsn/sgsn_vty.c b/src/sgsn/sgsn_vty.c index 1a104b3..42e91e9 100644 --- a/src/sgsn/sgsn_vty.c +++ b/src/sgsn/sgsn_vty.c @@ -34,6 +34,9 @@ #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> #include <osmocom/gsm/apn.h> +#include <osmocom/gtp/gtp.h> +#include <osmocom/gtp/pdp.h> + #include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/sgsn.h> #include <osmocom/gprs/gprs_ns2.h> @@ -57,9 +60,6 @@ #include <osmocom/gprs/gprs_bssgp.h> -#include <pdp.h> -#include <gtp.h> - #include "../../config.h" #ifdef BUILD_IU diff --git a/tests/gtphub/gtphub_test.c b/tests/gtphub/gtphub_test.c index 5fa730a..c5cd103 100644 --- a/tests/gtphub/gtphub_test.c +++ b/tests/gtphub/gtphub_test.c @@ -29,11 +29,12 @@ #include <osmocom/core/application.h> #include <osmocom/gsm/protocol/gsm_23_003.h> +#include <osmocom/gtp/gtp.h> +#include <osmocom/gtp/gtpie.h> + #include <osmocom/sgsn/debug.h> #include <osmocom/gtphub/gtphub.h> -#include <gtp.h> -#include <gtpie.h> #define ZERO_STRUCT(struct_pointer) memset(struct_pointer, '\0', \ sizeof(*(struct_pointer))) -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39244?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I5ea50c9766f719e1eea89cbf6783fafc2093773d Gerrit-Change-Number: 39244 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[XS] Change in osmo-sgsn[master]: gprs_gmm_util: add IE GSM48_IE_GMM_UE_NET_CAP
by lynxis lazus 07 Jan '25

07 Jan '25
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39245?usp=email ) Change subject: gprs_gmm_util: add IE GSM48_IE_GMM_UE_NET_CAP ...................................................................... gprs_gmm_util: add IE GSM48_IE_GMM_UE_NET_CAP Change-Id: Ia8e2630a370f6066f4e3f0ea0d685f1556efac05 --- M src/sgsn/gprs_gmm_util.c 1 file changed, 1 insertion(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/45/39245/1 diff --git a/src/sgsn/gprs_gmm_util.c b/src/sgsn/gprs_gmm_util.c index 4f61669..ee51ceb 100644 --- a/src/sgsn/gprs_gmm_util.c +++ b/src/sgsn/gprs_gmm_util.c @@ -52,6 +52,7 @@ [GSM48_IE_GMM_TIMER_T3302] = { TLV_TYPE_TLV, 0 }, [GSM48_IE_GMM_AUTH_FAIL_PAR] = { TLV_TYPE_TLV, 0 }, [GSM48_IE_GMM_MS_NET_CAPA] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_UE_NET_CAP] = { TLV_TYPE_TLV, 0 }, [GSM48_IE_GMM_PDP_CTX_STATUS] = { TLV_TYPE_TLV, 0 }, [GSM48_IE_GMM_PS_LCS_CAPA] = { TLV_TYPE_TLV, 0 }, [GSM48_IE_GMM_GMM_MBMS_CTX_ST] = { TLV_TYPE_TLV, 0 }, -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39245?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ia8e2630a370f6066f4e3f0ea0d685f1556efac05 Gerrit-Change-Number: 39245 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[M] Change in osmo-sgsn[master]: gprs_gmm_util: add parsing of GMM Attach Requests
by lynxis lazus 07 Jan '25

07 Jan '25
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39246?usp=email ) Change subject: gprs_gmm_util: add parsing of GMM Attach Requests ...................................................................... gprs_gmm_util: add parsing of GMM Attach Requests Change-Id: I4a82e0c4070da982efd6c2f15fd145393423772b --- M include/osmocom/sgsn/gprs_gmm_util.h M src/sgsn/gprs_gmm_util.c 2 files changed, 133 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/46/39246/1 diff --git a/include/osmocom/sgsn/gprs_gmm_util.h b/include/osmocom/sgsn/gprs_gmm_util.h index c136cce..c844caf 100644 --- a/include/osmocom/sgsn/gprs_gmm_util.h +++ b/include/osmocom/sgsn/gprs_gmm_util.h @@ -4,6 +4,7 @@ #include <stdint.h> #include <osmocom/gsm/gsm23003.h> +#include <osmocom/gsm/gsm48.h> #include <osmocom/gsm/tlv.h> struct msgb; @@ -22,4 +23,20 @@ struct tlv_parsed tlv; }; +struct gprs_gmm_att_req { + uint8_t skip_ind; /* 10.3.1 */ + uint8_t attach_type; /* 10.5.5.2 */ + bool follow_up_req; /* 10.5.5.2 */ + uint8_t cksq; /* 10.5.1.2 */ + uint16_t drx_parms; /* 10.5.5.6 */ + struct osmo_mobile_identity mi; /* 10.5.1.4 */ + struct osmo_routing_area_id old_rai; /* 10.5.5.15 */ + uint8_t *ms_network_cap; /* 10.5.5.12 */ + uint8_t ms_network_cap_len; + uint8_t *ms_radio_cap; /* 10.5.5.12a */ + uint8_t ms_radio_cap_len; + struct tlv_parsed tlv; +}; + int gprs_gmm_parse_ra_upd_req(struct msgb *msg, struct gprs_gmm_ra_upd_req *rau_req); +int gprs_gmm_parse_att_req(struct msgb *msg, struct gprs_gmm_att_req *att_req); diff --git a/src/sgsn/gprs_gmm_util.c b/src/sgsn/gprs_gmm_util.c index ee51ceb..549e0b1 100644 --- a/src/sgsn/gprs_gmm_util.c +++ b/src/sgsn/gprs_gmm_util.c @@ -29,6 +29,7 @@ #include <osmocom/gsm/protocol/gsm_04_08_gprs.h> #include <osmocom/gsm/tlv.h> +#include <osmocom/sgsn/debug.h> #include <osmocom/sgsn/gprs_gmm_util.h> const struct tlv_definition gsm48_gmm_ie_tlvdef = { @@ -63,6 +64,121 @@ }, }; +const struct tlv_definition gsm48_gmm_att_ie_tlvdef = { + .def = { + [GSM48_IE_GMM_PTMSI_SIG] = { TLV_TYPE_FIXED, 3 }, + [GSM48_IE_GMM_TIMER_READY] = { TLV_TYPE_TV, 1 }, + [GSM48_IE_GMM_TMSI_STATUS] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_PS_LCS_CAPA] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_MS_CLASSMARK2] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_MS_CLASSMARK3] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_SUPP_CODEC_LIST] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_UE_NET_CAP] = { TLV_TYPE_TLV, 2 }, + [GSM48_IE_GMM_ADD_IDENTITY] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_RAI2] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_VD_PREF_UE_USAGE] = { TLV_TYPE_TLV, 1 }, + [GSM48_IE_GMM_DEVICE_PROP] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_PTMSI_TYPE] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_MS_NET_FEAT_SUP] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_ADD_UPDATE_TYPE] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_TMSI_BASED_NRI_C] = { TLV_TYPE_TLV, 4 }, + [GMM48_IE_GMM_TIMER_T3324] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_TIMER_T3312_EXT] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_EXT_DRX_PARAMS] = { TLV_TYPE_TLV, 3 }, + } +}; + + +/*! Parse 24.008 9.4.1 Attach Request + * \param[in] msg l3 pointers must point to gmm. + * \param[out] rau_req parsed RA update request + * \returns 0 on success or GMM cause + */ +int gprs_gmm_parse_att_req(struct msgb *msg, struct gprs_gmm_att_req *att_req) +{ + uint8_t *cur, len; + size_t mandatory_fields_len; + struct gsm48_hdr *gh; + int ret; + + OSMO_ASSERT(msg); + OSMO_ASSERT(att_req); + + memset(att_req, 0, sizeof(struct gprs_gmm_att_req)); + /* all mandatory fields */ + if (msgb_l3len(msg) < 25) + return GMM_CAUSE_PROTO_ERR_UNSPEC; + + gh = (struct gsm48_hdr *) msgb_gmmh(msg); + cur = gh->data; + + att_req->skip_ind = gh->proto_discr >> 4; + + /* LV: MS network cap 10.5.5.12 */ + len = *cur++; + if (msgb_l3len(msg) < (len + 21 + (cur - msgb_gmmh(msg)))) + return GMM_CAUSE_PROTO_ERR_UNSPEC; + /* MS network cap must be at least 2 bytes long */ + if (len == 0) + return GMM_CAUSE_INV_MAND_INFO; + + att_req->ms_network_cap = cur; + att_req->ms_network_cap_len = len; + cur += len; + + /* V: Update Type 10.5.5.18 */ + att_req->attach_type = *cur & 0x07; + att_req->follow_up_req = !!(*cur & 0x08); + + /* V: GPRS Ciphering Key Sequence 10.5.1.2 */ + att_req->cksq = *cur >> 4; + cur++; + + /* V: DRX parameter 10.5.5.6 */ + att_req->drx_parms = osmo_load16le(cur); + cur += 2; + + /* LV: Mobile identity 10.5.1.4 */ + len = *cur++; + if (msgb_l3len(msg) < (len + 12 + (cur - msgb_gmmh(msg)))) + return GMM_CAUSE_PROTO_ERR_UNSPEC; + ret = osmo_mobile_identity_decode(&att_req->mi, cur, len, false); + if (ret) + return GMM_CAUSE_PROTO_ERR_UNSPEC; + cur += len; + + /* V: Old routing area identification 10.5.5.15 */ + osmo_routing_area_id_decode(&att_req->old_rai, cur, 6); + cur += 6; + + /* LV: MS radio cap 10.5.5.12a */ + len = *cur++; + if (msgb_l3len(msg) < (len + (cur - msgb_gmmh(msg)))) + return GMM_CAUSE_PROTO_ERR_UNSPEC; + /* 24.008 Rel 17 specifies min 5, but SGSN will still work with 4 */ + if (len < 4) + return GMM_CAUSE_INV_MAND_INFO; + + att_req->ms_radio_cap = cur; + att_req->ms_radio_cap_len = len; + cur += len; + + mandatory_fields_len = (cur - msgb_gmmh(msg)); + if (msgb_l3len(msg) == mandatory_fields_len) + return 0; + + ret = tlv_parse(&att_req->tlv, &gsm48_gmm_att_ie_tlvdef, + cur, msgb_l3len(msg) - mandatory_fields_len, 0, 0); + + /* gracefully handle unknown IEs (partial parsing) */ + if (ret < 0 && ret != OSMO_TLVP_ERR_UNKNOWN_TLV_TYPE) { + LOGP(DMM, LOGL_NOTICE, "%s(): tlv_parse() failed (%d)\n", __func__, ret); + return GMM_CAUSE_COND_IE_ERR; + } + + return 0; +} + /*! Parse 24.008 9.4.14 RAU Request * \param[in] msg l3 pointers must point to gmm. * \param[out] rau_req parsed RA update request -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39246?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I4a82e0c4070da982efd6c2f15fd145393423772b Gerrit-Change-Number: 39246 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[S] Change in osmo-sgsn[master]: gprs_gmm_util: use a RAU specific TLV dictionary
by lynxis lazus 07 Jan '25

07 Jan '25
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39247?usp=email ) Change subject: gprs_gmm_util: use a RAU specific TLV dictionary ...................................................................... gprs_gmm_util: use a RAU specific TLV dictionary Limit the known and allowed TLVs according to the spec. Change-Id: I460971deeebc9977a984937c542b263d941e78df --- M src/sgsn/gprs_gmm_util.c 1 file changed, 34 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/47/39247/1 diff --git a/src/sgsn/gprs_gmm_util.c b/src/sgsn/gprs_gmm_util.c index 549e0b1..b0c9a46 100644 --- a/src/sgsn/gprs_gmm_util.c +++ b/src/sgsn/gprs_gmm_util.c @@ -89,6 +89,38 @@ }; + +const struct tlv_definition gsm48_gmm_rau_ie_tlvdef = { + .def = { + [GSM48_IE_GMM_PTMSI_SIG] = { TLV_TYPE_FIXED, 3 }, + [GSM48_IE_GMM_TIMER_READY] = { TLV_TYPE_TV, 1 }, + [GSM48_IE_GMM_DRX_PARAM] = { TLV_TYPE_FIXED, 2 }, + [GSM48_IE_GMM_TMSI_STATUS] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_ALLOC_PTMSI] = { TLV_TYPE_TLV, 5 }, + [GSM48_IE_GMM_MS_NET_CAPA] = { TLV_TYPE_TLV, 2 }, + [GSM48_IE_GMM_PDP_CTX_STATUS] = { TLV_TYPE_TLV, 2 }, + [GSM48_IE_GMM_PS_LCS_CAPA] = { TLV_TYPE_TLV, 1 }, + [GSM48_IE_GMM_GMM_MBMS_CTX_ST] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_UE_NET_CAP] = { TLV_TYPE_TLV, 2 }, + [GSM48_IE_GMM_ADD_IDENTITY] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_RAI2] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_MS_CLASSMARK2] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_MS_CLASSMARK3] = { TLV_TYPE_TLV, 0 }, + [GSM48_IE_GMM_SUPP_CODEC_LIST] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_VD_PREF_UE_USAGE] = { TLV_TYPE_TLV, 1 }, + [GSM48_IE_GMM_PTMSI_TYPE] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_DEVICE_PROP] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_MS_NET_FEAT_SUP] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_OLD_LAI] = { TLV_TYPE_TLV, 5 }, + [GSM48_IE_GMM_ADD_UPDATE_TYPE] = { TLV_TYPE_SINGLE_TV, 1 }, + [GSM48_IE_GMM_TMSI_BASED_NRI_C] = { TLV_TYPE_TLV, 4 }, + [GMM48_IE_GMM_TIMER_T3324] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_TIMER_T3312_EXT] = { TLV_TYPE_TLV, 3 }, + [GSM48_IE_GMM_EXT_DRX_PARAMS] = { TLV_TYPE_TLV, 3 }, + } +}; + + /*! Parse 24.008 9.4.1 Attach Request * \param[in] msg l3 pointers must point to gmm. * \param[out] rau_req parsed RA update request @@ -230,8 +262,8 @@ if (msgb_l3len(msg) == mandatory_fields_len) return 0; - ret = tlv_parse(&rau_req->tlv, &gsm48_gmm_ie_tlvdef, - cur, msgb_l3len(msg) - mandatory_fields_len, 0, 0); + ret = tlv_parse(&rau_req->tlv, &gsm48_gmm_rau_ie_tlvdef, + cur, msgb_l3len(msg) - mandatory_fields_len, 0, 0); if (ret < 0) return GMM_CAUSE_COND_IE_ERR; -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39247?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I460971deeebc9977a984937c542b263d941e78df Gerrit-Change-Number: 39247 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[S] Change in osmo-sgsn[master]: Refactor mmctx_is_r99 into mmctx.c
by lynxis lazus 07 Jan '25

07 Jan '25
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39242?usp=email ) Change subject: Refactor mmctx_is_r99 into mmctx.c ...................................................................... Refactor mmctx_is_r99 into mmctx.c It is related to the mmctx and doesn't has anything to do with GMM. Change-Id: I198a3c9d49667c70e8995808b3fcb5ea26e8f17a --- M include/osmocom/sgsn/mmctx.h M src/sgsn/gprs_gmm.c M src/sgsn/mmctx.c 3 files changed, 17 insertions(+), 14 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/42/39242/1 diff --git a/include/osmocom/sgsn/mmctx.h b/include/osmocom/sgsn/mmctx.h index 03bb845..9fa06dc 100644 --- a/include/osmocom/sgsn/mmctx.h +++ b/include/osmocom/sgsn/mmctx.h @@ -282,6 +282,8 @@ struct sgsn_pdp_ctx *sgsn_pdp_ctx_by_tid(const struct sgsn_mm_ctx *mm, uint8_t tid); +bool sgsn_mm_ctx_is_r99(const struct sgsn_mm_ctx *mm); + uint32_t sgsn_alloc_ptmsi(void); /* Called on subscriber data updates */ diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 424c8db..7c1614b 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -479,16 +479,6 @@ return gsm48_gmm_sendmsg(msg, 1, mm, false); } -/* determine if the MS/UE supports R99 or later */ -static bool mmctx_is_r99(const struct sgsn_mm_ctx *mm) -{ - if (mm->ms_network_capa.len < 1) - return false; - if (mm->ms_network_capa.buf[0] & 0x01) - return true; - return false; -} - static enum gprs_ciph_algo gprs_ms_net_select_best_gea(uint8_t net_mask, uint8_t ms_mask) { uint8_t common_mask = net_mask & ms_mask; uint8_t r = 0; @@ -514,8 +504,8 @@ LOGMMCTXP(LOGL_INFO, mm, "<- GMM AUTH AND CIPHERING REQ (rand = %s," " mmctx_is_r99=%d, vec->auth_types=0x%x", osmo_hexdump(vec->rand, sizeof(vec->rand)), - mmctx_is_r99(mm), vec->auth_types); - if (mmctx_is_r99(mm) && vec + sgsn_mm_ctx_is_r99(mm), vec->auth_types); + if (sgsn_mm_ctx_is_r99(mm) && vec && (vec->auth_types & OSMO_AUTH_TYPE_UMTS)) { LOGPC(DMM, LOGL_INFO, ", autn = %s)\n", osmo_hexdump(vec->autn, sizeof(vec->autn))); @@ -558,7 +548,7 @@ * the optional AUTN IE. If a classic GSM SIM is * inserted, it will simply ignore AUTN and just use * RAND */ - if (mmctx_is_r99(mm) && + if (sgsn_mm_ctx_is_r99(mm) && (vec->auth_types & OSMO_AUTH_TYPE_UMTS)) { msgb_tlv_put(msg, GSM48_IE_GMM_AUTN, sizeof(vec->autn), vec->autn); @@ -602,7 +592,7 @@ * However, on GERAN, even if we sent a UMTS AKA Authentication Request, the MS may decide to * instead reply with a GSM AKA SRES response. */ if (is_utran - || (mmctx_is_r99(ctx) && (vec->auth_types & OSMO_AUTH_TYPE_UMTS) + || (sgsn_mm_ctx_is_r99(ctx) && (vec->auth_types & OSMO_AUTH_TYPE_UMTS) && (res_len > sizeof(vec->sres)))) { expect_type = OSMO_AUTH_TYPE_UMTS; expect_str = "UMTS RES"; diff --git a/src/sgsn/mmctx.c b/src/sgsn/mmctx.c index e0af4ed..ae73320 100644 --- a/src/sgsn/mmctx.c +++ b/src/sgsn/mmctx.c @@ -597,3 +597,14 @@ return ggsn; } + + +/* determine if the MS/UE supports R99 or later */ +bool sgsn_mm_ctx_is_r99(const struct sgsn_mm_ctx *mm) +{ + if (mm->ms_network_capa.len < 1) + return false; + if (mm->ms_network_capa.buf[0] & 0x01) + return true; + return false; +} -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39242?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I198a3c9d49667c70e8995808b3fcb5ea26e8f17a Gerrit-Change-Number: 39242 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[M] Change in osmo-sgsn[master]: GMM: rework PDP context status
by lynxis lazus 07 Jan '25

07 Jan '25
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39241?usp=email ) Change subject: GMM: rework PDP context status ...................................................................... GMM: rework PDP context status Use an uint16 instead of an pointer with an unknown length. Also encode the current active PDP context (e.g. on 2G/4G mobilty this could change) also helpful to resynchronize it close it while the MS is not reachable. Change-Id: I12d3110c9365132f96ef7ff8a1be22a431682c81 --- M src/sgsn/gprs_gmm.c M tests/sgsn/sgsn_test.c 2 files changed, 77 insertions(+), 55 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/41/39241/1 diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 6122421..424c8db 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -196,6 +196,61 @@ sgsn_mm_ctx_cleanup_free(ctx); } + +/* 3GPP TS 24.008 § 10.5.7.1 Process PDP context status value, bit 0 correspond to nsapi 0 */ +static void process_ms_ctx_status(struct sgsn_mm_ctx *mmctx, + uint16_t pdp_status) +{ + struct sgsn_pdp_ctx *pdp, *pdp2; + /* 24.008 4.7.5.1.3: If the PDP context status information element is + * included in ROUTING AREA UPDATE REQUEST message, then the network + * shall deactivate all those PDP contexts locally (without peer to + * peer signalling between the MS and the network), which are not in SM + * state PDP-INACTIVE on network side but are indicated by the MS as + * being in state PDP-INACTIVE. */ + + /* NSAPI 0 - 4 are spare, ignore these */ + pdp_status &= 0xffe0; + + llist_for_each_entry_safe(pdp, pdp2, &mmctx->pdp_list, list) { + bool active = (pdp_status & (1 << pdp->nsapi)); + if (active) + continue; + + LOGMMCTXP(LOGL_NOTICE, mmctx, "Dropping PDP context for NSAPI=%u " + "due to PDP CTX STATUS IE=0x%02x\n", + pdp->nsapi, pdp_status); + pdp->ue_pdp_active = false; + if (pdp->ggsn) + sgsn_delete_pdp_ctx(pdp); + else /* GTP side already detached, freeing */ + sgsn_pdp_ctx_free(pdp); + } +} + +/* 3GPP TS 24.008 § 10.5.7.1 Encode PDP context status value, bit 0 correspond to nsapi 0 */ +uint16_t encode_ms_ctx_status(struct sgsn_mm_ctx *mmctx) +{ + struct sgsn_pdp_ctx *pdp; + + uint16_t pdp_status = 0; + + llist_for_each_entry(pdp, &mmctx->pdp_list, list) { + if (pdp->ue_pdp_active) + pdp_status |= (1 << pdp->nsapi); + } + + return pdp_status; +} + +/* 3GPP TS 24.008 § 4.7.13.4/10.5.7.1 Service request procedure not accepted by the + * network. Returns true if MS has active PDP contexts in pdp_status */ +bool pdp_status_has_active_nsapis(uint16_t pdp_status) +{ + /* NSAPI 0 - 4 are spare and should be ignored 0 */ + return (pdp_status >> 5) != 0; +} + /* Chapter 9.4.18 */ static int _tx_status(struct msgb *msg, uint8_t cause, struct sgsn_mm_ctx *mmctx) @@ -1487,6 +1542,8 @@ rua = (struct gsm48_ra_upd_ack *) msgb_put(msg, sizeof(*rua)); rua->force_stby = 0; /* not indicated */ rua->upd_result = 0; /* RA updated */ + + /* Periodic RA update timer */ t = osmo_tdef_get(sgsn->cfg.T_defs, 3312, OSMO_TDEF_S, -1); rua->ra_upd_timer = gprs_secs_to_tmr_floor(t); @@ -1515,12 +1572,19 @@ } *l = rc; #endif + /* MS identity */ + /* List of Received N-PDU */ /* Optional: Negotiated READY timer value */ t = osmo_tdef_get(sgsn->cfg.T_defs, 3314, OSMO_TDEF_S, -1); msgb_tv_put(msg, GSM48_IE_GMM_TIMER_READY, gprs_secs_to_tmr_floor(t)); - /* Option: MS ID, ... */ + /* GMM cause */ + /* PDP Context Status */ + uint16_t pdp_ctx_status = encode_ms_ctx_status(mm); + msgb_tlv_put(msg, GSM48_IE_GMM_PDP_CTX_STATUS, 2, (uint8_t *) &pdp_ctx_status); + + /* MS ID, ... */ return gsm48_gmm_sendmsg(msg, 0, mm, true); } @@ -1545,48 +1609,6 @@ return gsm48_gmm_sendmsg(msg, 0, NULL, false); } -static void process_ms_ctx_status(struct sgsn_mm_ctx *mmctx, - const uint8_t *pdp_status) -{ - struct sgsn_pdp_ctx *pdp, *pdp2; - /* 24.008 4.7.5.1.3: If the PDP context status information element is - * included in ROUTING AREA UPDATE REQUEST message, then the network - * shall deactivate all those PDP contexts locally (without peer to - * peer signalling between the MS and the network), which are not in SM - * state PDP-INACTIVE on network side but are indicated by the MS as - * being in state PDP-INACTIVE. */ - - llist_for_each_entry_safe(pdp, pdp2, &mmctx->pdp_list, list) { - bool inactive = (pdp->nsapi < 8) ? - !(pdp_status[0] & (1 << pdp->nsapi)) : - !(pdp_status[1] & (1 << (pdp->nsapi - 8))); - if (!inactive) - continue; - - LOGMMCTXP(LOGL_NOTICE, mmctx, "Dropping PDP context for NSAPI=%u " - "due to PDP CTX STATUS IE=0x%02x%02x\n", - pdp->nsapi, pdp_status[1], pdp_status[0]); - pdp->ue_pdp_active = false; - if (pdp->ggsn) - sgsn_delete_pdp_ctx(pdp); - else /* GTP side already detached, freeing */ - sgsn_pdp_ctx_free(pdp); - } -} - -/* 3GPP TS 24.008 § 4.7.13.4 Service request procedure not accepted by the - * network. Returns true if MS has active PDP contexts in pdp_status */ -bool pdp_status_has_active_nsapis(const uint8_t *pdp_status, const size_t pdp_status_len) -{ - size_t i; - - for (i = 0; i < pdp_status_len; i++) - if (pdp_status[i] != 0) - return true; - - return false; -} - /* Chapter 9.4.14: Routing area update request */ static int gsm48_rx_gmm_ra_upd_req(struct sgsn_mm_ctx *mmctx, struct msgb *msg, struct gprs_llc_llme *llme) @@ -1777,7 +1799,7 @@ /* Look at PDP Context Status IE and see if MS's view of * activated/deactivated NSAPIs agrees with our view */ if (TLVP_PRESENT(&req.tlv, GSM48_IE_GMM_PDP_CTX_STATUS)) { - const uint8_t *pdp_status = TLVP_VAL(&req.tlv, GSM48_IE_GMM_PDP_CTX_STATUS); + uint16_t pdp_status = osmo_load16le(TLVP_VAL(&req.tlv, GSM48_IE_GMM_PDP_CTX_STATUS)); process_ms_ctx_status(mmctx, pdp_status); } @@ -1936,8 +1958,7 @@ /* Look at PDP Context Status IE and see if MS's view of * activated/deactivated NSAPIs agrees with our view */ if (TLVP_PRESENT(&tp, GSM48_IE_GMM_PDP_CTX_STATUS)) { - const uint8_t *pdp_status = TLVP_VAL(&tp, GSM48_IE_GMM_PDP_CTX_STATUS); - const size_t pdp_status_len = TLVP_LEN(&tp, GSM48_IE_GMM_PDP_CTX_STATUS); + uint16_t pdp_status = tlvp_val16be(&tp, GSM48_IE_GMM_PDP_CTX_STATUS); process_ms_ctx_status(ctx, pdp_status); @@ -1946,7 +1967,7 @@ * Active state in pdp_status but there is no PDP contexts on * SGSN side then Reject with the cause will force the mobile to * reset PDP contexts */ - if (llist_empty(&ctx->pdp_list) && pdp_status_has_active_nsapis(pdp_status, pdp_status_len)) { + if (llist_empty(&ctx->pdp_list) && pdp_status_has_active_nsapis(pdp_status)) { reject_cause = GMM_CAUSE_NO_PDP_ACTIVATED; goto rejected; } diff --git a/tests/sgsn/sgsn_test.c b/tests/sgsn/sgsn_test.c index 29dad74..6dcda84 100644 --- a/tests/sgsn/sgsn_test.c +++ b/tests/sgsn/sgsn_test.c @@ -1582,20 +1582,21 @@ cleanup_test(); } -bool pdp_status_has_active_nsapis(const uint8_t *pdp_status, const size_t pdp_status_len); +bool pdp_status_has_active_nsapis(uint16_t pdp_status); static void test_pdp_status_has_active_nsapis(void) { - const size_t pdp_status_len = 2; - const uint8_t pdp_status1[] = { 0b00100000, 0b00000000 }; /* PDP NSAPI 5 active */ - const uint8_t pdp_status2[] = { 0b00000000, 0b00000000 }; /* no active PDP NSAPI */ - const uint8_t pdp_status3[] = { 0b00000000, 0b00000001 }; /* PDP NSAPI 8 active */ + uint16_t pdp_status1 = 0b0000000000100000; /* PDP NSAPI 5 active */ + uint16_t pdp_status2 = 0b0000000000000000; /* no active PDP NSAPI */ + uint16_t pdp_status3 = 0b0000000100000000; /* PDP NSAPI 8 active */ + uint16_t pdp_status4 = 0b0000000000000001; /* reserved NSAPI 0 active -> no active */ printf("Testing pdp_status_has_active_nsapis\n"); - OSMO_ASSERT(pdp_status_has_active_nsapis(pdp_status1, pdp_status_len)); - OSMO_ASSERT(!pdp_status_has_active_nsapis(pdp_status2, pdp_status_len)); - OSMO_ASSERT(pdp_status_has_active_nsapis(pdp_status3, pdp_status_len)); + OSMO_ASSERT(pdp_status_has_active_nsapis(pdp_status1)); + OSMO_ASSERT(!pdp_status_has_active_nsapis(pdp_status2)); + OSMO_ASSERT(pdp_status_has_active_nsapis(pdp_status3)); + OSMO_ASSERT(!pdp_status_has_active_nsapis(pdp_status4)); } static struct log_info_cat gprs_categories[] = { -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39241?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: I12d3110c9365132f96ef7ff8a1be22a431682c81 Gerrit-Change-Number: 39241 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[XS] Change in osmo-sgsn[master]: gprs_ms_net_cap_gea_mask(): protect against empty MS Network Capabili...
by lynxis lazus 07 Jan '25

07 Jan '25
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/39243?usp=email ) Change subject: gprs_ms_net_cap_gea_mask(): protect against empty MS Network Capabilities ...................................................................... gprs_ms_net_cap_gea_mask(): protect against empty MS Network Capabilities When the MS Network Capability is empty, expect to support at least unecnrypted communications. This shouldn't be empty at all. Change-Id: Ieef2e3eeaaadc90c35fff6f20d47bd36aaa4b9e6 --- M src/sgsn/gprs_gmm.c 1 file changed, 4 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/43/39243/1 diff --git a/src/sgsn/gprs_gmm.c b/src/sgsn/gprs_gmm.c index 7c1614b..5ed190b 100644 --- a/src/sgsn/gprs_gmm.c +++ b/src/sgsn/gprs_gmm.c @@ -1201,6 +1201,10 @@ static uint8_t gprs_ms_net_cap_gea_mask(const uint8_t *ms_net_cap, uint8_t cap_len) { uint8_t mask = (1 << GPRS_ALGO_GEA0); + + if (cap_len == 0) + return mask; + mask |= (0x80 & ms_net_cap[0]) ? (1 << GPRS_ALGO_GEA1) : 0; if (cap_len < 2) -- To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/39243?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-sgsn Gerrit-Branch: master Gerrit-Change-Id: Ieef2e3eeaaadc90c35fff6f20d47bd36aaa4b9e6 Gerrit-Change-Number: 39243 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
1 0
0 0
[L] Change in osmo-mgw[master]: mgw: CRCX: Split mgcp header pars parsing into a previous step
by daniel 07 Jan '25

07 Jan '25
Attention is currently required from: pespin. daniel has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-mgw/+/39224?usp=email ) Change subject: mgw: CRCX: Split mgcp header pars parsing into a previous step ...................................................................... Patch Set 2: (1 comment) File src/libosmo-mgcp/mgcp_msg.c: https://gerrit.osmocom.org/c/osmo-mgw/+/39224/comment/bfa942d8_65dc74d0?usp… : PS2, Line 172: * \returns 0 when parsing was successful, negative (MGCP cause code) on error. */ The error returns here are not negative. You should change the code to return negative errors and also the checks in `handle_create_conn()`. Also having defines for the errors (protocol error, unsupported parameter, ..) here and in `mgcp_parse_header()` would help readability - maybe in a follow-up commit. -- To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/39224?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-mgw Gerrit-Branch: master Gerrit-Change-Id: I3ee5158c254213203830fe9c38de11c15b4b19c1 Gerrit-Change-Number: 39224 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: daniel <dwillmann(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 07 Jan 2025 16:15:42 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • ...
  • 150
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.