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

September 2022

  • 2 participants
  • 1860 discussions
Change in osmo-tetra[master]: More robust bounds checking on llc pdu parsing
by laforge 27 Sep '22

27 Sep '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29447 ) Change subject: More robust bounds checking on llc pdu parsing ...................................................................... More robust bounds checking on llc pdu parsing We now have a list containing the lengths of the different llc pdu type minimum lengths Before parsing the pdu, we validate the l2len is indeed sufficient to contain the pdu This prevents out-of-bounds reads for corrupted packets. Change-Id: I118ba2227a22afd295fffaa51aab3e45e85ff3d7 --- M src/tetra_llc_pdu.c 1 file changed, 33 insertions(+), 24 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/tetra_llc_pdu.c b/src/tetra_llc_pdu.c index a4c520d..d4a1eb1 100644 --- a/src/tetra_llc_pdu.c +++ b/src/tetra_llc_pdu.c @@ -82,6 +82,25 @@ return get_value_string(pdut_dec_names, pdut); } +static const uint8_t tetra_llc_pdu_lengths[16] = { + 6, /* TLLC_PDUT_BL_ADATA */ + 5, /* TLLC_PDUT_BL_DATA */ + 4, /* TLLC_PDUT_BL_UDATA */ + 5, /* TLLC_PDUT_BL_ACK */ + 6 + 32, /* TLLC_PDUT_BL_ADATA_FCS */ + 5 + 32, /* TLLC_PDUT_BL_DATA_FCS */ + 4 + 32, /* TLLC_PDUT_BL_UDATA_FCS */ + 5 + 32, /* TLLC_PDUT_BL_ACK_FCS */ + 0, /* Not implemented, TLLC_PDUT_AL_SETUP */ + 13, /* TLLC_PDUT_AL_DATA_FINAL */ + 17, /* TLLC_PDUT_AL_UDATA_UFINAL */ + 1, /* Not implemented, TLLC_PDUT_AL_ACK_RNR */ + 0, /* Not implemented, TLLC_PDUT_AL_RECONNECT */ + 0, /* Not implemented, TLLC_PDUT_SUPPL */ + 0, /* Not implemented, TLLC_PDUT_L2SIG */ + 0, /* Not implemented, TLLD_PDUT_AL_DISC */ +}; + static uint32_t tetra_llc_compute_fcs(const uint8_t *buf, int len) { uint32_t crc = 0xFFFFFFFF; @@ -99,7 +118,7 @@ return ~crc; } -static int tetra_llc_check_fcs(struct tetra_llc_pdu *lpp, uint8_t *buf, int len) +static bool tetra_llc_check_fcs(struct tetra_llc_pdu *lpp, uint8_t *buf, int len) { uint32_t computed_fcs = tetra_llc_compute_fcs(buf, len); return lpp->fcs == computed_fcs; @@ -110,12 +129,19 @@ uint8_t *cur = buf; uint8_t pdu_type; - lpp->have_fcs = 0; + lpp->have_fcs = false; lpp->fcs = 0; - lpp->fcs_invalid = 0; + lpp->fcs_invalid = false; pdu_type = bits_to_uint(cur, 4); cur += 4; + /* Check length to prevent out of bounds reads */ + if (len < tetra_llc_pdu_lengths[pdu_type]) { + printf("WARNING llc pdu too small to parse, needed %d\n", tetra_llc_pdu_lengths[pdu_type]); + lpp->tl_sdu_len = 0; + return len; + } + switch (pdu_type) { case TLLC_PDUT_BL_ADATA: @@ -127,12 +153,8 @@ lpp->pdu_type = TLLC_PDUT_DEC_BL_ADATA; if (pdu_type == TLLC_PDUT_BL_ADATA_FCS) { - if (lpp->tl_sdu_len < 32) { - printf("\nWARNING frame too small for FCS (%d)\n", lpp->tl_sdu_len); - goto out; - } lpp->tl_sdu_len -= 32; - lpp->have_fcs = 1; + lpp->have_fcs = true; lpp->fcs = bits_to_uint(buf + len - 32, 32); lpp->fcs_invalid = !tetra_llc_check_fcs(lpp, cur, lpp->tl_sdu_len); } @@ -146,12 +168,8 @@ lpp->pdu_type = TLLC_PDUT_DEC_BL_DATA; if (pdu_type == TLLC_PDUT_BL_DATA_FCS) { - if (lpp->tl_sdu_len < 32) { - printf("\nWARNING frame too small for FCS (%d)\n", lpp->tl_sdu_len); - goto out; - } lpp->tl_sdu_len -= 32; - lpp->have_fcs = 1; + lpp->have_fcs = true; lpp->fcs = bits_to_uint(buf + len - 32, 32); lpp->fcs_invalid = !tetra_llc_check_fcs(lpp, cur, lpp->tl_sdu_len); } @@ -164,12 +182,8 @@ lpp->pdu_type = TLLC_PDUT_DEC_BL_UDATA; if (pdu_type == TLLC_PDUT_BL_UDATA_FCS) { - if (lpp->tl_sdu_len < 32) { - printf("\nWARNING frame too small for FCS (%d)\n", lpp->tl_sdu_len); - goto out; - } lpp->tl_sdu_len -= 32; - lpp->have_fcs = 1; + lpp->have_fcs = true; lpp->fcs = bits_to_uint(buf + len - 32, 32); lpp->fcs_invalid = !tetra_llc_check_fcs(lpp, cur, lpp->tl_sdu_len); } @@ -183,12 +197,8 @@ lpp->pdu_type = TLLC_PDUT_DEC_BL_ACK; if (pdu_type == TLLC_PDUT_BL_ACK_FCS) { - if (lpp->tl_sdu_len < 32) { - printf("\nWARNING frame too small for FCS (%d)\n", lpp->tl_sdu_len); - goto out; - } lpp->tl_sdu_len -= 32; - lpp->have_fcs = 1; + lpp->have_fcs = true; lpp->fcs = bits_to_uint(buf + len - 32, 32); lpp->fcs_invalid = !tetra_llc_check_fcs(lpp, cur, lpp->tl_sdu_len); } @@ -286,7 +296,6 @@ lpp->tl_sdu_len = 0; } -out: /* Sanity check to prevent (further) out of bounds reads */ if (len < cur - buf) { lpp->tl_sdu_len = 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29447 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: I118ba2227a22afd295fffaa51aab3e45e85ff3d7 Gerrit-Change-Number: 29447 Gerrit-PatchSet: 2 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-tetra[master]: Reformatting to prevent linter warnings
by laforge 27 Sep '22

27 Sep '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29407 ) Change subject: Reformatting to prevent linter warnings ...................................................................... Reformatting to prevent linter warnings Change-Id: I0dc35e7d536900b4beed19042183838857b7dac7 --- M src/crc_test.c M src/testpdu.c M src/tetra_cmce_pdu.c M src/tetra_common.c M src/tetra_common.h M src/tetra_mac_pdu.c M src/tetra_mm_pdu.c M src/tetra_mm_pdu.h 8 files changed, 67 insertions(+), 68 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, approved diff --git a/src/crc_test.c b/src/crc_test.c index d46d0cc..34fda40 100644 --- a/src/crc_test.c +++ b/src/crc_test.c @@ -59,7 +59,7 @@ crc = ~crc16_itut_bits(0xffff, input2, 60); printf("The CRC is now: %d/0x%x\n", crc, crc); - + /* swap the bytes */ crc = (crc << 8) | (crc >> 8); osmo_pbit2ubit(&input2[60], (uint8_t *)&crc, 16); diff --git a/src/testpdu.c b/src/testpdu.c index 24fd609..329bf9f 100644 --- a/src/testpdu.c +++ b/src/testpdu.c @@ -54,7 +54,7 @@ bitvec_set_uint(&bv, 262, 10); /* MCC */ bitvec_set_uint(&bv, 42, 14); /* MNC */ bitvec_set_uint(&bv, 0, 2); /* Neighbor cell boradcast: not supported */ - bitvec_set_uint(&bv, 0, 2); /* Cell service level: unknown */ + bitvec_set_uint(&bv, 0, 2); /* Cell service level: unknown */ bitvec_set_bit(&bv, 0); /* Late entry information */ printf("SYNC PDU: %s\n", osmo_hexdump(pdu_sync, sizeof(pdu_sync))); diff --git a/src/tetra_cmce_pdu.c b/src/tetra_cmce_pdu.c index b7cf618..d383411 100644 --- a/src/tetra_cmce_pdu.c +++ b/src/tetra_cmce_pdu.c @@ -24,23 +24,23 @@ #include "tetra_cmce_pdu.h" static const struct value_string cmce_pdut_d_names[] = { - { TCMCE_PDU_T_D_ALERT, "D-ALERT" }, - { TCMCE_PDU_T_D_CALL_PROCEEDING,"D-CALL PROCEEDING" }, - { TCMCE_PDU_T_D_CONNECT, "D-CONNECT" }, - { TCMCE_PDU_T_D_CONNECT_ACK, "D-CONNECT ACK" }, - { TCMCE_PDU_T_D_DISCONNECT, "D-DISCONNECT" }, - { TCMCE_PDU_T_D_INFO, "D-INFO" }, - { TCMCE_PDU_T_D_RELEASE, "D-RELEASE" }, - { TCMCE_PDU_T_D_SETUP, "D-SETUP" }, - { TCMCE_PDU_T_D_STATUS, "D-STATUS" }, - { TCMCE_PDU_T_D_TX_CEASED, "D-TX CEASED" }, - { TCMCE_PDU_T_D_TX_CONTINUE, "D-TX CONTINUE" }, - { TCMCE_PDU_T_D_TX_GRANTED, "D-TX GRANTED" }, - { TCMCE_PDU_T_D_TX_WAIT, "D-TX WAIT" }, - { TCMCE_PDU_T_D_TX_INTERRUPT, "D-TX INTERRUPT" }, - { TCMCE_PDU_T_D_CALL_RESTORE, "D-TX CALL RESTORE" }, - { TCMCE_PDU_T_D_SDS_DATA, "D-SDS DATA" }, - { TCMCE_PDU_T_D_FACILITY, "D-FACILITY" }, + { TCMCE_PDU_T_D_ALERT, "D-ALERT" }, + { TCMCE_PDU_T_D_CALL_PROCEEDING, "D-CALL PROCEEDING" }, + { TCMCE_PDU_T_D_CONNECT, "D-CONNECT" }, + { TCMCE_PDU_T_D_CONNECT_ACK, "D-CONNECT ACK" }, + { TCMCE_PDU_T_D_DISCONNECT, "D-DISCONNECT" }, + { TCMCE_PDU_T_D_INFO, "D-INFO" }, + { TCMCE_PDU_T_D_RELEASE, "D-RELEASE" }, + { TCMCE_PDU_T_D_SETUP, "D-SETUP" }, + { TCMCE_PDU_T_D_STATUS, "D-STATUS" }, + { TCMCE_PDU_T_D_TX_CEASED, "D-TX CEASED" }, + { TCMCE_PDU_T_D_TX_CONTINUE, "D-TX CONTINUE" }, + { TCMCE_PDU_T_D_TX_GRANTED, "D-TX GRANTED" }, + { TCMCE_PDU_T_D_TX_WAIT, "D-TX WAIT" }, + { TCMCE_PDU_T_D_TX_INTERRUPT, "D-TX INTERRUPT" }, + { TCMCE_PDU_T_D_CALL_RESTORE, "D-TX CALL RESTORE" }, + { TCMCE_PDU_T_D_SDS_DATA, "D-SDS DATA" }, + { TCMCE_PDU_T_D_FACILITY, "D-FACILITY" }, { 0, NULL } }; diff --git a/src/tetra_common.c b/src/tetra_common.c index 92b8a1e..453d44f 100644 --- a/src/tetra_common.c +++ b/src/tetra_common.c @@ -47,7 +47,7 @@ [0] = 0, [1] = 6250, [2] = -6250, - [3] = +12500, + [3] = 12500, }; uint32_t tetra_dl_carrier_hz(uint8_t band, uint16_t carrier, uint8_t offset) @@ -78,14 +78,14 @@ uint32_t duplex_spacing = tetra_duplex_spacing[duplex & 7][band & 15]; if (duplex_spacing < 0) /* reserved for future standardization */ - return 0; + return 0; duplex_spacing *= 1000; // make Hz if (reverse) - freq += duplex_spacing; + freq += duplex_spacing; else - freq -= duplex_spacing; + freq -= duplex_spacing; return freq; } diff --git a/src/tetra_common.h b/src/tetra_common.h index d141e9b..dc538d0 100644 --- a/src/tetra_common.h +++ b/src/tetra_common.h @@ -8,7 +8,7 @@ #ifdef DEBUG #define DEBUGP(x, args...) printf(x, ## args) #else -#define DEBUGP(x, args...) do { } while(0) +#define DEBUGP(x, args...) do { } while (0) #endif #define TETRA_SYM_PER_TS 255 diff --git a/src/tetra_mac_pdu.c b/src/tetra_mac_pdu.c index c71e458..06c93ef 100644 --- a/src/tetra_mac_pdu.c +++ b/src/tetra_mac_pdu.c @@ -61,20 +61,19 @@ sid->cck_id = bits_to_uint(cur, 16); else sid->hyperframe_number = bits_to_uint(cur, 16); - sid->option_field = bits_to_uint(cur, 2); cur += 2; - switch(sid->option_field) - { - case TETRA_MAC_OPT_FIELD_EVEN_MULTIFRAME: // Even multiframe definition for TS mode - case TETRA_MAC_OPT_FIELD_ODD_MULTIFRAME: // Odd multiframe definition for TS mode - sid->frame_bitmap = bits_to_uint(cur, 20); cur += 20; - break; - case TETRA_MAC_OPT_FIELD_ACCESS_CODE: // Default definition for access code A - sid->access_code = bits_to_uint(cur, 20); cur += 20; - break; - case TETRA_MAC_OPT_FIELD_EXT_SERVICES: // Extended services broadcast - sid->ext_service = bits_to_uint(cur, 20); cur += 20; - break; + + switch (sid->option_field) { + case TETRA_MAC_OPT_FIELD_EVEN_MULTIFRAME: // Even multiframe definition for TS mode + case TETRA_MAC_OPT_FIELD_ODD_MULTIFRAME: // Odd multiframe definition for TS mode + sid->frame_bitmap = bits_to_uint(cur, 20); cur += 20; + break; + case TETRA_MAC_OPT_FIELD_ACCESS_CODE: // Default definition for access code A + sid->access_code = bits_to_uint(cur, 20); cur += 20; + break; + case TETRA_MAC_OPT_FIELD_EXT_SERVICES: // Extended services broadcast + sid->ext_service = bits_to_uint(cur, 20); cur += 20; + break; } decode_d_mle_sysinfo(&sid->mle_si, si_bits + 124-42); // could be also cur due to previous fixes @@ -95,12 +94,12 @@ { const uint8_t *cur = bits; - cad->type = bits_to_uint(cur, 2); cur += 2; - cad->timeslot = bits_to_uint(cur, 4); cur += 4; - cad->ul_dl = bits_to_uint(cur, 2); cur += 2; - cad->clch_perm = *cur++; - cad->cell_chg_f = *cur++; - cad->carrier_nr = bits_to_uint(cur, 12); cur += 12; + cad->type = bits_to_uint(cur, 2); cur += 2; + cad->timeslot = bits_to_uint(cur, 4); cur += 4; + cad->ul_dl = bits_to_uint(cur, 2); cur += 2; + cad->clch_perm = *cur++; + cad->cell_chg_f = *cur++; + cad->carrier_nr = bits_to_uint(cur, 12); cur += 12; cad->ext_carr_pres = *cur++; if (cad->ext_carr_pres) { @@ -115,15 +114,15 @@ cur += 2; } if (cad->ul_dl == 0) { - cad->aug.ul_dl_ass = bits_to_uint(cur, 2); cur += 2; - cad->aug.bandwidth = bits_to_uint(cur, 3); cur += 3; - cad->aug.modulation = bits_to_uint(cur, 3); cur += 3; - cad->aug.max_ul_qam = bits_to_uint(cur, 3); cur += 3; + cad->aug.ul_dl_ass = bits_to_uint(cur, 2); cur += 2; + cad->aug.bandwidth = bits_to_uint(cur, 3); cur += 3; + cad->aug.modulation = bits_to_uint(cur, 3); cur += 3; + cad->aug.max_ul_qam = bits_to_uint(cur, 3); cur += 3; cur += 3; /* reserved */ - cad->aug.conf_chan_stat=bits_to_uint(cur, 3); cur += 3; - cad->aug.bs_imbalance = bits_to_uint(cur, 4); cur += 4; - cad->aug.bs_tx_rel = bits_to_uint(cur, 5); cur += 5; - cad->aug.napping_sts = bits_to_uint(cur, 2); cur += 2; + cad->aug.conf_chan_stat = bits_to_uint(cur, 3); cur += 3; + cad->aug.bs_imbalance = bits_to_uint(cur, 4); cur += 4; + cad->aug.bs_tx_rel = bits_to_uint(cur, 5); cur += 5; + cad->aug.napping_sts = bits_to_uint(cur, 2); cur += 2; if (cad->aug.napping_sts == 1) cur += 11; /* napping info 21.5.2c */ cur += 4; /* reserved */ @@ -385,14 +384,14 @@ } static const struct value_string addr_type_names[] = { - { ADDR_TYPE_NULL, "Null PDU" }, - { ADDR_TYPE_SSI, "SSI" }, - { ADDR_TYPE_EVENT_LABEL,"Event Label" }, - { ADDR_TYPE_USSI, "USSI (migrading MS un-exchanged)" }, - { ADDR_TYPE_SMI, "SMI (management)" }, - { ADDR_TYPE_SSI_EVENT, "SSI + Event Label" }, - { ADDR_TYPE_SSI_USAGE, "SSI + Usage Marker" }, - { ADDR_TYPE_SMI_EVENT, "SMI + Event Label" }, + { ADDR_TYPE_NULL, "Null PDU" }, + { ADDR_TYPE_SSI, "SSI" }, + { ADDR_TYPE_EVENT_LABEL, "Event Label" }, + { ADDR_TYPE_USSI, "USSI (migrading MS un-exchanged)" }, + { ADDR_TYPE_SMI, "SMI (management)" }, + { ADDR_TYPE_SSI_EVENT, "SSI + Event Label" }, + { ADDR_TYPE_SSI_USAGE, "SSI + Usage Marker" }, + { ADDR_TYPE_SMI_EVENT, "SMI + Event Label" }, { 0, NULL } }; const char *tetra_get_addr_t_name(uint8_t addrt) diff --git a/src/tetra_mm_pdu.c b/src/tetra_mm_pdu.c index 9b004f2..3760f13 100644 --- a/src/tetra_mm_pdu.c +++ b/src/tetra_mm_pdu.c @@ -24,7 +24,7 @@ #include "tetra_mm_pdu.h" static const struct value_string mm_pdut_d_names[] = { - { TMM_PDU_T_D_OTAR, "D-OTAR" }, + { TMM_PDU_T_D_OTAR, "D-OTAR" }, { TMM_PDU_T_D_AUTH, "D-AUTHENTICATION" }, { TMM_PDU_T_D_CK_CHG_DEM, "D-CK CHANGE DEMAND" }, { TMM_PDU_T_D_DISABLE, "D-DISABLE" }, diff --git a/src/tetra_mm_pdu.h b/src/tetra_mm_pdu.h index 22c0eae..58deed2 100644 --- a/src/tetra_mm_pdu.h +++ b/src/tetra_mm_pdu.h @@ -3,14 +3,14 @@ /* 16.10.39 PDU Type */ enum tetra_mm_pdu_type_d { - TMM_PDU_T_D_OTAR = 0x0, - TMM_PDU_T_D_AUTH = 0x1, - TMM_PDU_T_D_CK_CHG_DEM = 0x2, - TMM_PDU_T_D_DISABLE = 0x3, - TMM_PDU_T_D_ENABLE = 0x4, - TMM_PDU_T_D_LOC_UPD_ACC = 0x5, - TMM_PDU_T_D_LOC_UPD_CMD = 0x6, - TMM_PDU_T_D_LOC_UPD_REJ = 0x7, + TMM_PDU_T_D_OTAR = 0x0, + TMM_PDU_T_D_AUTH = 0x1, + TMM_PDU_T_D_CK_CHG_DEM = 0x2, + TMM_PDU_T_D_DISABLE = 0x3, + TMM_PDU_T_D_ENABLE = 0x4, + TMM_PDU_T_D_LOC_UPD_ACC = 0x5, + TMM_PDU_T_D_LOC_UPD_CMD = 0x6, + TMM_PDU_T_D_LOC_UPD_REJ = 0x7, /* RES */ TMM_PDU_T_D_LOC_UPD_PROC = 0x9, TMM_PDU_T_D_ATT_DET_GRP = 0xa, 3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29407 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: I0dc35e7d536900b4beed19042183838857b7dac7 Gerrit-Change-Number: 29407 Gerrit-PatchSet: 6 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-tetra[master]: added support for advanced link defragmentation
by laforge 27 Sep '22

27 Sep '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29405 ) Change subject: added support for advanced link defragmentation ...................................................................... added support for advanced link defragmentation the rx_tm_sdu and rx_tl_sdu did not belong in tetra_upper_mac and are removed. Instead, we use rx_tm_sdu in tetra_llc.c, who in turn invokes rx_tl_sdu in tetra_mle.c. The llc can now also make use of the advanced link defragmentation code that was already there but unused. Change-Id: I294c684e97c55876f1a207a7152a83dad4ebaa26 --- M src/Makefile M src/tetra_llc.c A src/tetra_llc.h A src/tetra_mle.c A src/tetra_mle.h M src/tetra_upper_mac.c 6 files changed, 110 insertions(+), 88 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/Makefile b/src/Makefile index b21f846..41250a9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -13,7 +13,7 @@ libosmo-tetra-phy.a: phy/tetra_burst_sync.o phy/tetra_burst.o $(AR) r $@ $^ -libosmo-tetra-mac.a: lower_mac/tetra_conv_enc.o lower_mac/tch_reordering.o tetra_tdma.o lower_mac/tetra_scramb.o lower_mac/tetra_rm3014.o lower_mac/tetra_interleave.o lower_mac/crc_simple.o tetra_common.o lower_mac/viterbi.o lower_mac/viterbi_cch.o lower_mac/viterbi_tch.o lower_mac/tetra_lower_mac.o tetra_upper_mac.o tetra_mac_pdu.o tetra_llc_pdu.o tetra_llc.o tetra_mle_pdu.o tetra_mm_pdu.o tetra_cmce_pdu.o tetra_sndcp_pdu.o tetra_gsmtap.o tuntap.o +libosmo-tetra-mac.a: lower_mac/tetra_conv_enc.o lower_mac/tch_reordering.o tetra_tdma.o lower_mac/tetra_scramb.o lower_mac/tetra_rm3014.o lower_mac/tetra_interleave.o lower_mac/crc_simple.o tetra_common.o lower_mac/viterbi.o lower_mac/viterbi_cch.o lower_mac/viterbi_tch.o lower_mac/tetra_lower_mac.o tetra_upper_mac.o tetra_mac_pdu.o tetra_llc_pdu.o tetra_llc.o tetra_mle_pdu.o tetra_mle.o tetra_mm_pdu.o tetra_cmce_pdu.o tetra_sndcp_pdu.o tetra_gsmtap.o tuntap.o $(AR) r $@ $^ float_to_bits: float_to_bits.o diff --git a/src/tetra_llc.c b/src/tetra_llc.c index e0d5cab..b8a378d 100644 --- a/src/tetra_llc.c +++ b/src/tetra_llc.c @@ -28,6 +28,7 @@ #include <osmocom/core/bits.h> #include "tetra_llc_pdu.h" +#include "tetra_mle.h" #include "tuntap.h" static int tun_fd = -1; @@ -36,8 +37,6 @@ .rx.defrag_list = LLIST_HEAD_INIT(g_llcs.rx.defrag_list), }; -int rx_tl_sdu(struct msgb *msg, unsigned int len); - static struct tllc_defrag_q_e * get_dqe_for_ns(struct tllc_state *llcs, uint8_t ns, int alloc_if_missing) { @@ -79,8 +78,7 @@ return 0; } -static int tllc_defrag_out(struct tllc_state *llcs, - struct tetra_llc_pdu *lpp) +static int tllc_defrag_out(struct tetra_mac_state *tms, struct tllc_state *llcs, struct tetra_llc_pdu *lpp) { struct tllc_defrag_q_e *dqe; struct msgb *msg; @@ -90,7 +88,7 @@ printf("<<REMOVE>> "); msg->l3h = msg->data; - rx_tl_sdu(msg, msgb_l3len(msg)); + rx_tl_sdu(tms, msg, msgb_l3len(msg)); if (tun_fd < 0) { tun_fd = tun_alloc("tun0"); @@ -110,16 +108,34 @@ /* Receive TM-SDU (MAC SDU == LLC PDU) */ /* this resembles TMA-UNITDATA.ind (TM-SDU / length) */ -int rx_tm_sdu(struct msgb *msg, unsigned int len) +int rx_tm_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len) { - struct tetra_llc_pdu lpp; + if (!len) { + return -1; + } else if (len < 4) { + printf("WARNING rx_tm_sdu: l2len too small: %d\n", len); + return -1; + } + struct tetra_llc_pdu lpp; memset(&lpp, 0, sizeof(lpp)); tetra_llc_pdu_parse(&lpp, msg->l2h, len); msg->l3h = lpp.tl_sdu; + msg->tail = msg->l3h + lpp.tl_sdu_len; // Strips off FCS (if present) - printf("TM-SDU(%s,%u,%u): ", - tetra_get_llc_pdut_dec_name(lpp.pdu_type), lpp.ns, lpp.ss); + printf("TM-SDU(%s)", tetra_get_llc_pdut_dec_name(lpp.pdu_type)); + if (lpp.have_fcs) { + printf(" fcs=%s ", (lpp.have_fcs && lpp.fcs_invalid ? "BAD" : "OK")); + } + printf(" l3len=%d", msgb_l3len(msg)); + if (msgb_l3len(msg)) { + printf(" %s", osmo_ubit_dump(msg->l3h, msgb_l3len(msg))); + } + printf("\n"); + + if (!lpp.tl_sdu_len) { + return len; + } switch (lpp.pdu_type) { case TLLC_PDUT_DEC_BL_ADATA: @@ -132,7 +148,7 @@ case TLLC_PDUT_DEC_AL_RECONNECT: case TLLC_PDUT_DEC_AL_DISC: /* directly hand it to MLE */ - rx_tl_sdu(msg, lpp.tl_sdu_len); + rx_tl_sdu(tms, msg, lpp.tl_sdu_len); break; case TLLC_PDUT_DEC_AL_DATA: case TLLC_PDUT_DEC_AL_UDATA: @@ -148,7 +164,7 @@ /* input into LLC defragmenter */ tllc_defrag_in(&g_llcs, &lpp, msg, len); /* check if the fragment is complete and hand it off*/ - tllc_defrag_out(&g_llcs, &lpp); + tllc_defrag_out(tms, &g_llcs, &lpp); break; case TLLC_PDUT_DEC_UNKNOWN: @@ -158,9 +174,5 @@ break; } - if (lpp.tl_sdu && lpp.ss == 0) { - /* this resembles TMA-UNITDATA.ind */ - //rx_tl_sdu(msg, lpp.tl_sdu_len); - } return len; } diff --git a/src/tetra_llc.h b/src/tetra_llc.h new file mode 100644 index 0000000..134fdb5 --- /dev/null +++ b/src/tetra_llc.h @@ -0,0 +1,8 @@ +#ifndef TETRA_LLC_H +#define TETRA_LLC_H + +#include "tetra_common.h" + +int rx_tm_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len); + +#endif diff --git a/src/tetra_mle.c b/src/tetra_mle.c new file mode 100644 index 0000000..a957bc9 --- /dev/null +++ b/src/tetra_mle.c @@ -0,0 +1,53 @@ +#include <stdint.h> +#include <stdio.h> +#include <unistd.h> +#include <string.h> + +#include <osmocom/core/msgb.h> +#include <osmocom/core/talloc.h> +#include <osmocom/core/bits.h> + +#include "tetra_mle_pdu.h" +#include "tetra_mle.h" +#include "tetra_mm_pdu.h" +#include "tetra_cmce_pdu.h" +#include "tetra_sndcp_pdu.h" +#include "tetra_mle_pdu.h" + + + +/* Receive TL-SDU (LLC SDU == MLE PDU) */ +int rx_tl_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len) +{ + uint8_t *bits = msg->l3h; + uint8_t mle_pdisc = bits_to_uint(bits, 3); + + printf("TL-SDU(%s): %s ", tetra_get_mle_pdisc_name(mle_pdisc), + osmo_ubit_dump(bits, len)); + switch (mle_pdisc) { + case TMLE_PDISC_MM: + printf("%s\n", tetra_get_mm_pdut_name(bits_to_uint(bits+3, 4), 0)); + break; + case TMLE_PDISC_CMCE: + printf("%s\n", tetra_get_cmce_pdut_name(bits_to_uint(bits+3, 5), 0)); + break; + case TMLE_PDISC_SNDCP: + printf("%s ", tetra_get_sndcp_pdut_name(bits_to_uint(bits+3, 4), 0)); + printf(" NSAPI=%u PCOMP=%u, DCOMP=%u", + bits_to_uint(bits+3+4, 4), + bits_to_uint(bits+3+4+4, 4), + bits_to_uint(bits+3+4+4+4, 4)); + printf(" V%u, IHL=%u", + bits_to_uint(bits+3+4+4+4+4, 4), + 4*bits_to_uint(bits+3+4+4+4+4+4, 4)); + printf(" Proto=%u\n", + bits_to_uint(bits+3+4+4+4+4+4+4+64, 8)); + break; + case TMLE_PDISC_MLE: + printf("%s\n", tetra_get_mle_pdut_name(bits_to_uint(bits+3, 3), 0)); + break; + default: + break; + } + return len; +} diff --git a/src/tetra_mle.h b/src/tetra_mle.h new file mode 100644 index 0000000..1488eb4 --- /dev/null +++ b/src/tetra_mle.h @@ -0,0 +1,8 @@ +#ifndef TETRA_MLE_H +#define TETRA_MLE_H + +#include "tetra_common.h" + +int rx_tl_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len); + +#endif diff --git a/src/tetra_upper_mac.c b/src/tetra_upper_mac.c index 86c4439..ef5ce39 100644 --- a/src/tetra_upper_mac.c +++ b/src/tetra_upper_mac.c @@ -32,14 +32,9 @@ #include "tetra_upper_mac.h" #include "tetra_mac_pdu.h" #include "tetra_llc_pdu.h" -#include "tetra_mm_pdu.h" -#include "tetra_cmce_pdu.h" -#include "tetra_sndcp_pdu.h" -#include "tetra_mle_pdu.h" +#include "tetra_llc.h" #include "tetra_gsmtap.h" -static int rx_tm_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len); - /* FIXME move global fragslots to context variable */ struct fragslot fragslots[FRAGSLOT_NR_SLOTS] = {0}; @@ -144,64 +139,6 @@ return buf; } -/* Receive TL-SDU (LLC SDU == MLE PDU) */ -static int rx_tl_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len) -{ - uint8_t *bits = msg->l3h; - uint8_t mle_pdisc = bits_to_uint(bits, 3); - - printf("TL-SDU(%s): %s", tetra_get_mle_pdisc_name(mle_pdisc), - osmo_ubit_dump(bits, len)); - switch (mle_pdisc) { - case TMLE_PDISC_MM: - printf(" %s", tetra_get_mm_pdut_name(bits_to_uint(bits+3, 4), 0)); - break; - case TMLE_PDISC_CMCE: - printf(" %s", tetra_get_cmce_pdut_name(bits_to_uint(bits+3, 5), 0)); - break; - case TMLE_PDISC_SNDCP: - printf(" %s", tetra_get_sndcp_pdut_name(bits_to_uint(bits+3, 4), 0)); - printf(" NSAPI=%u PCOMP=%u, DCOMP=%u", - bits_to_uint(bits+3+4, 4), - bits_to_uint(bits+3+4+4, 4), - bits_to_uint(bits+3+4+4+4, 4)); - printf(" V%u, IHL=%u", - bits_to_uint(bits+3+4+4+4+4, 4), - 4*bits_to_uint(bits+3+4+4+4+4+4, 4)); - printf(" Proto=%u", - bits_to_uint(bits+3+4+4+4+4+4+4+64, 8)); - break; - case TMLE_PDISC_MLE: - printf(" %s", tetra_get_mle_pdut_name(bits_to_uint(bits+3, 3), 0)); - break; - default: - break; - } - return len; -} - -static int rx_tm_sdu(struct tetra_mac_state *tms, struct msgb *msg, unsigned int len) -{ - struct tetra_llc_pdu lpp; - uint8_t *bits = msg->l2h; - - memset(&lpp, 0, sizeof(lpp)); - tetra_llc_pdu_parse(&lpp, bits, len); - - printf("TM-SDU(%s,%u,%u)", - tetra_get_llc_pdut_dec_name(lpp.pdu_type), lpp.ns, lpp.ss); - if (lpp.have_fcs) { - printf("(FCS: %s)", lpp.fcs_invalid ? "BAD" : "OK"); - } - printf(": "); - - if (lpp.tl_sdu && lpp.ss == 0) { - msg->l3h = lpp.tl_sdu; - rx_tl_sdu(tms, msg, lpp.tl_sdu_len); - } - return len; -} - static int rx_resrc(struct tetra_tmvsap_prim *tmvp, struct tetra_mac_state *tms) { struct msgb *msg = tmvp->oph.msg; @@ -231,22 +168,26 @@ /* We now have accurate length and start of TM-SDU, set LLC start in msg->l2h */ msg->l2h = msg->l1h + tmpdu_offset; - printf("RESOURCE Encr=%u, len=%d l1_len=%d l2_len %d Addr=%s ", + printf("RESOURCE Encr=%u len_field=%d l1_len=%d l2_len %d Addr=%s", rsd.encryption_mode, rsd.macpdu_length, msgb_l1len(msg), msgb_l2len(msg), tetra_addr_dump(&rsd.addr)); + if (rsd.chan_alloc_pres) + printf(" ChanAlloc=%s", tetra_alloc_dump(&rsd.cad, tms)); + + if (rsd.slot_granting.pres) + printf(" SlotGrant=%u/%u", rsd.slot_granting.nr_slots, + rsd.slot_granting.delay); + if (rsd.addr.type == ADDR_TYPE_NULL) { pdu_bits = -1; /* No more PDUs in slot */ goto out; } + if (msgb_l2len(msg) == 0) { + goto out; /* No l2 data */ + } - if (rsd.chan_alloc_pres) - printf("ChanAlloc=%s ", tetra_alloc_dump(&rsd.cad, tms)); - - if (rsd.slot_granting.pres) - printf("SlotGrant=%u/%u ", rsd.slot_granting.nr_slots, - rsd.slot_granting.delay); - + printf(": %s\n", osmo_ubit_dump(msg->l2h, msgb_l2len(msg))); if (rsd.macpdu_length != MACPDU_LEN_START_FRAG || !REASSEMBLE_FRAGMENTS) { /* Non-fragmented resource (or no reassembly desired) */ if (!rsd.is_encrypted) { -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29405 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: I294c684e97c55876f1a207a7152a83dad4ebaa26 Gerrit-Change-Number: 29405 Gerrit-PatchSet: 5 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-tetra[master]: Added support for BL-ACK, work on advanced link, small improvements
by laforge 27 Sep '22

27 Sep '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29390 ) Change subject: Added support for BL-ACK, work on advanced link, small improvements ...................................................................... Added support for BL-ACK, work on advanced link, small improvements BL-ACK with and without FCS are now supported Various improvements for advanced link parsing tetra_llc_pdu_parse now prevents further out-of-bounds reads by setting the tl sdu length to 0 whenever the tm sdu was too short for proper parsing Change-Id: If31858a16611ab7853e3ab840704dd2d9657a2a8 --- M src/tetra_llc_pdu.c 1 file changed, 92 insertions(+), 16 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/src/tetra_llc_pdu.c b/src/tetra_llc_pdu.c index 5bd1688..a4c520d 100644 --- a/src/tetra_llc_pdu.c +++ b/src/tetra_llc_pdu.c @@ -109,9 +109,10 @@ { uint8_t *cur = buf; uint8_t pdu_type; + lpp->have_fcs = 0; lpp->fcs = 0; - + lpp->fcs_invalid = 0; pdu_type = bits_to_uint(cur, 4); cur += 4; @@ -128,7 +129,7 @@ if (pdu_type == TLLC_PDUT_BL_ADATA_FCS) { if (lpp->tl_sdu_len < 32) { printf("\nWARNING frame too small for FCS (%d)\n", lpp->tl_sdu_len); - return cur-buf; + goto out; } lpp->tl_sdu_len -= 32; lpp->have_fcs = 1; @@ -147,7 +148,7 @@ if (pdu_type == TLLC_PDUT_BL_DATA_FCS) { if (lpp->tl_sdu_len < 32) { printf("\nWARNING frame too small for FCS (%d)\n", lpp->tl_sdu_len); - return cur-buf; + goto out; } lpp->tl_sdu_len -= 32; lpp->have_fcs = 1; @@ -165,7 +166,7 @@ if (pdu_type == TLLC_PDUT_BL_UDATA_FCS) { if (lpp->tl_sdu_len < 32) { printf("\nWARNING frame too small for FCS (%d)\n", lpp->tl_sdu_len); - return cur-buf; + goto out; } lpp->tl_sdu_len -= 32; lpp->have_fcs = 1; @@ -174,19 +175,46 @@ } break; + case TLLC_PDUT_BL_ACK: + case TLLC_PDUT_BL_ACK_FCS: + lpp->nr = *cur++; + lpp->tl_sdu = cur; + lpp->tl_sdu_len = len - (cur - buf); + lpp->pdu_type = TLLC_PDUT_DEC_BL_ACK; + + if (pdu_type == TLLC_PDUT_BL_ACK_FCS) { + if (lpp->tl_sdu_len < 32) { + printf("\nWARNING frame too small for FCS (%d)\n", lpp->tl_sdu_len); + goto out; + } + lpp->tl_sdu_len -= 32; + lpp->have_fcs = 1; + lpp->fcs = bits_to_uint(buf + len - 32, 32); + lpp->fcs_invalid = !tetra_llc_check_fcs(lpp, cur, lpp->tl_sdu_len); + } + break; + + case TLLC_PDUT_AL_SETUP: + /* TODO FIXME IMPLEMENT */ + lpp->pdu_type = TLLC_PDUT_DEC_AL_SETUP; + lpp->tl_sdu = cur; + lpp->tl_sdu_len = 0; + break; + case TLLC_PDUT_AL_DATA_FINAL: if (*cur++) { /* FINAL */ - cur++; + cur++; /* if set, AL_FINAL_AR */ lpp->ns = bits_to_uint(cur, 3); cur += 3; lpp->ss = bits_to_uint(cur, 8); cur += 8; - if (*cur++) { - /* FIXME: FCS */ - len -= 32; - } + lpp->tl_sdu = cur; lpp->tl_sdu_len = len - (cur - buf); lpp->pdu_type = TLLC_PDUT_DEC_AL_FINAL; + + /* Needs to be defragmented so FCS is checked elsewhere */ + lpp->have_fcs = 1; + } else { /* DATA Table 21.19 */ cur++; @@ -197,25 +225,73 @@ lpp->pdu_type = TLLC_PDUT_DEC_AL_DATA; } break; + case TLLC_PDUT_AL_UDATA_UFINAL: if (*cur++) { /* UFINAL 21.2.3.7 / Table 21.26 */ - lpp->ns = bits_to_uint(cur, 8); cur+= 8; - lpp->ss = bits_to_uint(cur, 8); cur+= 8; + lpp->ns = bits_to_uint(cur, 8); cur += 8; + lpp->ss = bits_to_uint(cur, 8); cur += 8; lpp->tl_sdu = cur; - /* FIXME: FCS */ - len -= 32; lpp->tl_sdu_len = len - (cur - buf); lpp->pdu_type = TLLC_PDUT_DEC_AL_UFINAL; + + /* Needs to be defragmented so FCS is checked elsewhere */ + lpp->have_fcs = 1; + } else { /* UDATA 21.2.3.6 / Table 21.24 */ - lpp->ns = bits_to_uint(cur, 8); cur+= 8; - lpp->ss = bits_to_uint(cur, 8); cur+= 8; + lpp->ns = bits_to_uint(cur, 8); cur += 8; + lpp->ss = bits_to_uint(cur, 8); cur += 8; lpp->tl_sdu = cur; lpp->tl_sdu_len = len - (cur - buf); lpp->pdu_type = TLLC_PDUT_DEC_AL_UDATA; } break; + + case TLLC_PDUT_AL_ACK_RNR: + /* TODO FIXME IMPLEMENT */ + if (*cur++) { + /* AL-ACK 21.2.3.1 */ + lpp->pdu_type = TLLC_PDUT_DEC_AL_ACK; + } else { + /* AL-RNR 21.2.3.1 */ + lpp->pdu_type = TLLC_PDUT_DEC_AL_RNR; + } + + lpp->tl_sdu = cur; + lpp->tl_sdu_len = 0; + break; + + case TLLC_PDUT_AL_RECONNECT: + /* TODO FIXME IMPLEMENT */ + lpp->pdu_type = TLLC_PDUT_DEC_AL_RECONNECT; + lpp->tl_sdu = cur; + lpp->tl_sdu_len = 0; + break; + + case TLLD_PDUT_AL_DISC: + /* TODO FIXME IMPLEMENT */ + lpp->pdu_type = TLLC_PDUT_DEC_AL_DISC; + lpp->tl_sdu = cur; + lpp->tl_sdu_len = 0; + break; + + case TLLC_PDUT_SUPPL: + case TLLC_PDUT_L2SIG: + /* TODO FIXME IMPLEMENT */ + default: + /* Prevent further parsing */ + lpp->pdu_type = TLLC_PDUT_DEC_UNKNOWN; + lpp->tl_sdu = cur; + lpp->tl_sdu_len = 0; } - return (cur - buf); + +out: + /* Sanity check to prevent (further) out of bounds reads */ + if (len < cur - buf) { + lpp->tl_sdu_len = 0; + return len; + } + + return cur - buf; } -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29390 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: If31858a16611ab7853e3ab840704dd2d9657a2a8 Gerrit-Change-Number: 29390 Gerrit-PatchSet: 6 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-tetra[master]: Added support for BL-ACK, work on advanced link, small improvements
by laforge 27 Sep '22

27 Sep '22
Attention is currently required from: wbokslag. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-tetra/+/29390 ) Change subject: Added support for BL-ACK, work on advanced link, small improvements ...................................................................... Patch Set 6: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-tetra/+/29390 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-tetra Gerrit-Branch: master Gerrit-Change-Id: If31858a16611ab7853e3ab840704dd2d9657a2a8 Gerrit-Change-Number: 29390 Gerrit-PatchSet: 6 Gerrit-Owner: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: wbokslag <w.bokslag(a)midnightblue.nl> Gerrit-Comment-Date: Tue, 27 Sep 2022 14:20:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: llc: implement Exchange Identification (XID) codec
by laforge 27 Sep '22

27 Sep '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/29482 ) Change subject: llc: implement Exchange Identification (XID) codec ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/29482 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I16b3f7ab82c489144098aad0dccc4c67d8382c67 Gerrit-Change-Number: 29482 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 27 Sep 2022 14:19:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: llc: add missing enum osmo_gprs_llc_xid_type values
by laforge 27 Sep '22

27 Sep '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/29481 ) Change subject: llc: add missing enum osmo_gprs_llc_xid_type values ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/29481 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: Ifdca0c742727a030008a01848153c23e0e0017bd Gerrit-Change-Number: 29481 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 27 Sep 2022 14:18:29 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in libosmo-gprs[master]: llc: add value-string for enum osmo_gprs_llc_xid_type
by laforge 27 Sep '22

27 Sep '22
Attention is currently required from: fixeria. laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/29480 ) Change subject: llc: add value-string for enum osmo_gprs_llc_xid_type ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/29480 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I90b6a1aa4e13984f4c43245df1308d0c3f82636f Gerrit-Change-Number: 29480 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Tue, 27 Sep 2022 14:18:14 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-ttcn3-hacks[master]: hnbgw: Add missing results to expected-results.xml
by laforge 27 Sep '22

27 Sep '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29494 ) Change subject: hnbgw: Add missing results to expected-results.xml ...................................................................... hnbgw: Add missing results to expected-results.xml Change-Id: I26ccbaa2b071af981bf707b41bc26fb86de62d77 --- M hnbgw/expected-results.xml 1 file changed, 4 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/hnbgw/expected-results.xml b/hnbgw/expected-results.xml index cc77dc6..3b338bf 100644 --- a/hnbgw/expected-results.xml +++ b/hnbgw/expected-results.xml @@ -1,6 +1,8 @@ <?xml version="1.0"?> <testsuite name='Titan' tests='13' failures='0' errors='0' skipped='0' inconc='0' time='MASKED'> <testcase classname='HNBGW_Tests' name='TC_hnb_register' time='MASKED'/> + <testcase classname='HNBGW_Tests' name='TC_hnb_register_duplicate' time='MASKED'/> + <testcase classname='HNBGW_Tests' name='TC_hnb_register_duplicate_reuse_sctp_assoc' time='MASKED' <testcase classname='HNBGW_Tests' name='TC_ranap_cs_initial_ue' time='MASKED'/> <testcase classname='HNBGW_Tests' name='TC_ranap_ps_initial_ue' time='MASKED'/> <testcase classname='HNBGW_Tests' name='TC_ranap_cs_initial_ue_empty_cr' time='MASKED'/> @@ -13,4 +15,6 @@ <testcase classname='HNBGW_Tests' name='TC_rab_assign_mgcp_to' time='MASKED'/> <testcase classname='HNBGW_Tests' name='TC_ranap_cs_mo_disconnect' time='MASKED'/> <testcase classname='HNBGW_Tests' name='TC_ranap_ps_mo_disconnect' time='MASKED'/> + <testcase classname='HNBGW_Tests' name='TC_ps_rab_assignment_without_pfcp' time='MASKED'/> + <testcase classname='HNBGW_Tests' name='TC_hnb_reregister_reuse_sctp_assoc' time='MASKED'/> </testsuite> -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29494 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: I26ccbaa2b071af981bf707b41bc26fb86de62d77 Gerrit-Change-Number: 29494 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-ttcn3-hacks[master]: hnbgw: Introduce test TC_hnb_register_duplicate_reuse_sctp_assoc
by laforge 27 Sep '22

27 Sep '22
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29493 ) Change subject: hnbgw: Introduce test TC_hnb_register_duplicate_reuse_sctp_assoc ...................................................................... hnbgw: Introduce test TC_hnb_register_duplicate_reuse_sctp_assoc Change-Id: I09ce08917b590ecd6fdf93f8b564a0d53900c871 --- M hnbgw/HNBGW_Tests.ttcn 1 file changed, 15 insertions(+), 0 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved diff --git a/hnbgw/HNBGW_Tests.ttcn b/hnbgw/HNBGW_Tests.ttcn index b1868c2..d77a18f 100644 --- a/hnbgw/HNBGW_Tests.ttcn +++ b/hnbgw/HNBGW_Tests.ttcn @@ -681,6 +681,8 @@ f_shutdown_helper(); } +/* Try to register the same HNB from 2 different concurrent connections. Second + * one should be rejected. */ testcase TC_hnb_register_duplicate() runs on test_CT { g_num_hnbs := 2; f_init(); @@ -690,6 +692,18 @@ f_shutdown_helper(); } +/* Try to register the same HNB in the same connection already established, aka + * duplicate HNB Register Request. It should be accepted and new configuration + * applied. TS 25.469 8.2.4 */ +testcase TC_hnb_register_duplicate_reuse_sctp_assoc() runs on test_CT { + g_num_hnbs := 1; + f_init(); + f_hnbap_register(0); + f_hnbap_register(0); + f_verify_talloc_count(HNBGWVTY, {"struct hnb_context"}, expect_count := 1); + f_shutdown_helper(); +} + /* Drop HNBAP conn (HNBAP DEREG) and reconnect it (HNBAP REG) using same SCTP association. * Related: OS#5676, SYS#6113 */ testcase TC_hnb_reregister_reuse_sctp_assoc() runs on test_CT { @@ -1431,6 +1445,7 @@ control { execute(TC_hnb_register()); execute(TC_hnb_register_duplicate()); + execute(TC_hnb_register_duplicate_reuse_sctp_assoc()); execute(TC_ranap_cs_initial_ue()); execute(TC_ranap_ps_initial_ue()); execute(TC_ranap_cs_initial_ue_empty_cr()); -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/29493 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: I09ce08917b590ecd6fdf93f8b564a0d53900c871 Gerrit-Change-Number: 29493 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(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: osmith <osmith(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • ...
  • 186
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.