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 -----
  • 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 2024

  • 1 participants
  • 1559 discussions
[S] Change in libosmocore[master]: coding: fix wrong n_bits_total reported for PDTCH CS2 and CS3
by fixeria 31 Jan '24

31 Jan '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35755?usp=email ) Change subject: coding: fix wrong n_bits_total reported for PDTCH CS2 and CS3 ...................................................................... coding: fix wrong n_bits_total reported for PDTCH CS2 and CS3 In gsm0503_pdtch_decode(), we decode CS2 and CS3 as if no puncturing was employed, reordering the coded bits and setting punctured ones to 0 manually. Because of that, osmo_conv_decode_ber_punctured() reports n_bits_total higher than we actually receive over the air. Change-Id: I6b20cc450f25c48175a61da02644d66c08e22ece Related: OS#6342, OS#6200 --- M src/coding/gsm0503_coding.c M tests/coding/coding_test.ok 2 files changed, 31 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/55/35755/1 diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 69a7ad4..022f465 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -1059,6 +1059,7 @@ return 23; case 2: + /* reorder, set punctured bits to 0 (unknown state) */ for (i = 587, j = 455; i >= 0; i--) { if (!gsm0503_puncture_cs2[i]) cB[i] = cB[j--]; @@ -1066,10 +1067,13 @@ cB[i] = 0; } + /* decode as if puncturing was not employed (note '_np') */ osmo_conv_decode_ber_punctured(&gsm0503_cs2_np, cB, conv, - n_errors, n_bits_total, + n_errors, NULL, gsm0503_puncture_cs2); - + /* indicate the actual amount of coded bits (excluding punctured ones) */ + if (n_bits_total != NULL) + *n_bits_total = 456; /* 5.1.2.2 a) the three USF bits d(0),d(1),d(2) are precoded into six bits */ for (i = 0; i < 8; i++) { @@ -1097,6 +1101,7 @@ return 34; case 3: + /* reorder, set punctured bits to 0 (unknown state) */ for (i = 675, j = 455; i >= 0; i--) { if (!gsm0503_puncture_cs3[i]) cB[i] = cB[j--]; @@ -1104,9 +1109,13 @@ cB[i] = 0; } + /* decode as if puncturing was not employed (note '_np') */ osmo_conv_decode_ber_punctured(&gsm0503_cs3_np, cB, conv, - n_errors, n_bits_total, + n_errors, NULL, gsm0503_puncture_cs3); + /* indicate the actual amount of coded bits (excluding punctured ones) */ + if (n_bits_total != NULL) + *n_bits_total = 456; /* 5.1.3.2 a) the three USF bits d(0),d(1),d(2) are precoded into six bits */ for (i = 0; i < 8; i++) { diff --git a/tests/coding/coding_test.ok b/tests/coding/coding_test.ok index ad8a98d..6767aea 100644 --- a/tests/coding/coding_test.ok +++ b/tests/coding/coding_test.ok @@ -270,7 +270,7 @@ 7f 7f 7f 81 7f 81 81 81 81 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 7f 81 7f 7f 81 7f 7f 81 7f 81 81 7f 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 7f 81 81 81 81 7f 81 7f 7f 7f 81 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 81 7f 81 7f 7f 7f 81 81 81 7f 81 81 81 7f 7f 7f 81 81 81 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 7f 7f 7f 81 81 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 81 7f 81 81 81 7f 7f 81 7f 81 81 81 7f 81 81 81 81 81 7f 81 7f 81 81 81 81 81 7f 81 81 7f 7f 81 81 Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 2f -pdtch_decode: n_errors=0 n_bits_total=588 ber=0.00 +pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 af 5f c6 36 43 44 03 U-Bits: @@ -284,7 +284,7 @@ 81 81 7f 7f 7f 81 81 7f 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 81 81 81 81 81 81 7f 81 7f 81 81 7f 7f 7f 81 81 81 7f 81 7f 81 81 81 81 81 7f 7f 81 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 7f 7f 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 81 81 7f 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 7f 7f 81 81 81 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 81 7f 81 7f 7f 81 81 81 7f 81 7f 7f 7f 7f 81 7f 81 81 81 7f 7f 7f 7f 7f 81 81 81 81 81 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 81 7f 7f 81 81 7f 81 81 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 7f 81 7f 7f 81 81 81 81 7f 81 7f 7f 81 81 7f 7f 81 81 Decoded: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 af 5f c6 36 43 44 03 -pdtch_decode: n_errors=0 n_bits_total=676 ber=0.00 +pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 Encoding: a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 59 a8 42 a3 af 5f c6 36 43 44 ab a3 af 5f c6 36 43 44 ab d9 6d 7d 62 24 c9 d2 92 fa 27 5d 71 7a 28 U-Bits: @@ -326,7 +326,7 @@ 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 7f 81 7f 81 81 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 81 7f 7f 7f 81 7f 81 81 81 81 7f 81 7f 81 7f 7f 81 81 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 7f 81 81 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 81 7f 7f 81 7f 7f 81 81 7f 7f 81 7f 81 7f 7f 81 81 81 7f 81 7f 81 81 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 81 81 81 7f 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 7f 81 81 81 7f 7f 7f 81 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 81 7f 81 7f 7f 81 81 7f 7f 81 7f Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 -pdtch_decode: n_errors=0 n_bits_total=588 ber=0.00 +pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 U-Bits: @@ -340,7 +340,7 @@ 81 7f 81 7f 81 81 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 7f 7f 81 81 7f 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 81 7f 81 7f 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 81 7f 7f 7f 81 7f 81 81 7f 81 7f 7f 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 81 7f 7f 81 7f 81 7f 7f 7f 7f 7f 7f 7f 7f 81 81 81 7f 7f 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 81 7f 7f 7f 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 7f 7f 81 7f 81 7f 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 81 7f 81 7f 81 7f 81 7f 7f 7f 7f 7f 7f 81 7f 81 81 81 81 7f 7f 7f 7f 7f 7f 81 7f 7f 7f 81 81 7f 81 7f 81 7f 7f 7f 81 7f 7f 81 7f 81 81 7f 81 7f 81 7f 7f 7f 7f 81 7f 7f 7f 81 81 81 81 7f 7f 7f Decoded: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 -pdtch_decode: n_errors=0 n_bits_total=676 ber=0.00 +pdtch_decode: n_errors=0 n_bits_total=456 ber=0.00 Encoding: 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 13 14 15 16 17 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 U-Bits: -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35755?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I6b20cc450f25c48175a61da02644d66c08e22ece Gerrit-Change-Number: 35755 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: coding: fix a typo in docs for gsm0503_pdtch_decode()
by fixeria 31 Jan '24

31 Jan '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35752?usp=email ) Change subject: coding: fix a typo in docs for gsm0503_pdtch_decode() ...................................................................... coding: fix a typo in docs for gsm0503_pdtch_decode() Change-Id: I72e7dab116229d908add3896ecb47b59e3001f1b --- M src/coding/gsm0503_coding.c 1 file changed, 10 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/52/35752/1 diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index 1f409d6..d63140e 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -1012,7 +1012,7 @@ * \param[in] bursts burst input data as soft unpacked bits * \param[out] usf_p Uplink State Flag, only relevant for DL blocks * \param[out] n_errors number of detected bit-errors - * \param[out] n_bits_total total number of dcoded bits + * \param[out] n_bits_total total number of decoded bits * \returns number of bytes decoded; negative on error */ int gsm0503_pdtch_decode(uint8_t *l2_data, const sbit_t *bursts, uint8_t *usf_p, int *n_errors, int *n_bits_total) -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35752?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I72e7dab116229d908add3896ecb47b59e3001f1b Gerrit-Change-Number: 35752 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: utils/conv_codes_gsm.py: fix inconsistent formatting
by fixeria 31 Jan '24

31 Jan '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35751?usp=email ) Change subject: utils/conv_codes_gsm.py: fix inconsistent formatting ...................................................................... utils/conv_codes_gsm.py: fix inconsistent formatting Change-Id: Ida99f0fe149b234c738875527dd64b610d33e050 --- M utils/conv_codes_gsm.py 1 file changed, 11 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/51/35751/1 diff --git a/utils/conv_codes_gsm.py b/utils/conv_codes_gsm.py index 24a8ee2..7f621b8 100644 --- a/utils/conv_codes_gsm.py +++ b/utils/conv_codes_gsm.py @@ -155,11 +155,11 @@ description = ["RACH convolutional code"] ), - # Extended RACH definition from 3GPP TS 45.003 §5.3.2 + # Extended RACH definition from 3GPP TS 45.003 §5.3.2 ConvolutionalCode( 17, shared_polys["xcch"], - puncture = [ 0, 2, 5, 37, 39, 41, -1 ], + puncture = [ 0, 2, 5, 37, 39, 41, -1 ], name = "rach_ext", description = ["Extended RACH (11 bit) convolutional code"] ), -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35751?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ida99f0fe149b234c738875527dd64b610d33e050 Gerrit-Change-Number: 35751 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[S] Change in libosmocore[master]: coding: inprove readability in osmo_conv_decode_ber_punctured()
by fixeria 31 Jan '24

31 Jan '24
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/35753?usp=email ) Change subject: coding: inprove readability in osmo_conv_decode_ber_punctured() ...................................................................... coding: inprove readability in osmo_conv_decode_ber_punctured() Change-Id: Iaece6d0fe42f173187baa5c87fcbe3cfc60c21fc Related: OS#6342, OS#6200 --- M src/coding/gsm0503_coding.c 1 file changed, 20 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/53/35753/1 diff --git a/src/coding/gsm0503_coding.c b/src/coding/gsm0503_coding.c index d63140e..9272fdb 100644 --- a/src/coding/gsm0503_coding.c +++ b/src/coding/gsm0503_coding.c @@ -536,7 +536,7 @@ int *n_errors, int *n_bits_total, const uint8_t *data_punc) { - int res, i, coded_len; + int res, coded_len; ubit_t recoded[EGPRS_DATA_C_MAX]; res = osmo_conv_decode(code, input, output); @@ -550,11 +550,15 @@ /* Count bit errors */ if (n_errors) { *n_errors = 0; - for (i = 0; i < coded_len; i++) { - if (((!data_punc) || (data_punc && !data_punc[i])) && - !((recoded[i] && input[i] < 0) || - (!recoded[i] && input[i] > 0)) ) - *n_errors += 1; + for (unsigned int i = 0; i < coded_len; i++) { + /* punctured bits do not count as bit errors */ + if (data_punc != NULL && data_punc[i]) + continue; + if (recoded[i] == 1 && input[i] < 0) + continue; + if (recoded[i] == 0 && input[i] > 0) + continue; + *n_errors += 1; } } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/35753?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Iaece6d0fe42f173187baa5c87fcbe3cfc60c21fc Gerrit-Change-Number: 35753 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
[M] Change in ...osmo-epdg[master]: UE-initiated detach: Do STR+STA ePDG<->AAA-Server
by pespin 31 Jan '24

31 Jan '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35737?usp=email ) Change subject: UE-initiated detach: Do STR+STA ePDG<->AAA-Server ...................................................................... UE-initiated detach: Do STR+STA ePDG<->AAA-Server Change-Id: I6f7554e24b26bfe191b28b56904bc8432690625d --- M src/aaa_diameter_swm.erl M src/epdg_diameter_swm.erl M src/epdg_ue_fsm.erl 3 files changed, 110 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/src/aaa_diameter_swm.erl b/src/aaa_diameter_swm.erl index f99ae91..a3e5132 100644 --- a/src/aaa_diameter_swm.erl +++ b/src/aaa_diameter_swm.erl @@ -14,7 +14,7 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2]). -export([code_change/3, terminate/2]). --export([auth_request/1, auth_compl_request/2]). +-export([auth_request/1, auth_compl_request/2, session_termination_request/1]). -define(SERVER, ?MODULE). @@ -32,6 +32,9 @@ auth_compl_request(Imsi, Apn) -> gen_server:cast(?SERVER, {epdg_auth_compl_req, Imsi, Apn}). +session_termination_request(Imsi) -> + gen_server:cast(?SERVER, {str, Imsi}). + handle_cast({epdg_auth_req, Imsi}, State) -> % request the diameter code for a tuple CKey = [], @@ -54,6 +57,10 @@ end, {noreply, State}; +handle_cast({str, Imsi}, State) -> + ok = epdg_diameter_swm:session_termination_answer(Imsi, 2001), + {noreply, State}; + handle_cast(Info, S) -> error_logger:error_report(["unknown handle_cast", {module, ?MODULE}, {info, Info}, {state, S}]), {noreply, S}. diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl index 7c2043d..bfb8f2d 100644 --- a/src/epdg_diameter_swm.erl +++ b/src/epdg_diameter_swm.erl @@ -19,8 +19,8 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2]). -export([code_change/3, terminate/2]). --export([auth_request/1, auth_compl_request/2]). --export([auth_response/2, auth_compl_response/2]). +-export([auth_request/1, auth_compl_request/2, session_termination_request/1]). +-export([auth_response/2, auth_compl_response/2, session_termination_answer/2]). -define(SERVER, ?MODULE). @@ -52,6 +52,15 @@ _ -> Result end. +% 3GPP TS 29.273 7.1.2.3 +session_termination_request(Imsi) -> + Result = gen_server:call(?SERVER, {str, Imsi}), + case Result of + {ok, _Mar} -> + epdg_ue_fsm:received_swm_session_terminate_answer(self(), Result), + ok; + _ -> Result + end. handle_call({epdg_auth_req, Imsi}, {Pid, _Tag} = _From, State0) -> % we yet don't implement the Diameter SWm interface on the wire, we process the call internally: @@ -68,6 +77,17 @@ undefined -> Reply = {error,unknown_imsi} end, + {reply, Reply, State}; + +handle_call({str, Imsi}, _From, State) -> + % we yet don't implement the Diameter SWm interface on the wire, we process the call internally: + Sess = find_swm_session_by_imsi(Imsi, State), + case Sess of + #swm_session{imsi = Imsi} -> + Reply = aaa_diameter_swm:session_termination_request(Imsi); + undefined -> + Reply = {error,unknown_imsi} + end, {reply, Reply, State}. handle_cast({epdg_auth_resp, Imsi, Result}, State) -> @@ -90,6 +110,16 @@ end, {noreply, State}; +handle_cast({sta, Imsi, Result}, State) -> + Sess = find_swm_session_by_imsi(Imsi, State), + case Sess of + #swm_session{imsi = Imsi} -> + epdg_ue_fsm:received_swm_session_termination_answer(Sess#swm_session.pid, Result); + undefined -> + error_logger:error_report(["unknown swm_session", {module, ?MODULE}, {imsi, Imsi}, {state, State}]) + end, + {noreply, State}; + handle_cast(Info, S) -> error_logger:error_report(["unknown handle_cast", {module, ?MODULE}, {info, Info}, {state, S}]), {noreply, S}. @@ -116,6 +146,10 @@ auth_compl_response(Imsi, Result) -> ok = gen_server:cast(?SERVER, {epdg_auth_compl_resp, Imsi, Result}). +% Rx SWm Diameter STA: +session_termination_answer(Imsi, Result) -> + ok = gen_server:cast(?SERVER, {sta, Imsi, Result}). + %% ------------------------------------------------------------------ %% Internal Function Definitions %% ------------------------------------------------------------------ diff --git a/src/epdg_ue_fsm.erl b/src/epdg_ue_fsm.erl index 1d934c5..3e9d1be 100644 --- a/src/epdg_ue_fsm.erl +++ b/src/epdg_ue_fsm.erl @@ -40,13 +40,15 @@ -export([start_link/1]). -export([init/1,callback_mode/0,terminate/3]). -export([auth_request/1, lu_request/1, tunnel_request/1, purge_ms_request/1]). --export([received_swm_auth_response/2, received_swm_auth_compl_response/2]). +-export([received_swm_auth_response/2, received_swm_auth_compl_response/2, received_swm_session_termination_answer/2]). -export([received_gtpc_create_session_response/2, received_gtpc_delete_session_response/2]). --export([state_new/3, state_wait_auth_resp/3, state_authenticating/3, state_authenticated/3, state_wait_delete_session_resp/3]). +-export([state_new/3, state_wait_auth_resp/3, state_authenticating/3, state_authenticated/3, + state_wait_delete_session_resp/3, state_wait_swm_session_termination_answer/3]). -record(ue_fsm_data, { imsi, - apn = "internet" :: string() + apn = "internet" :: string(), + tear_down_gsup_cause = 0 :: integer() }). start_link(Imsi) -> @@ -108,6 +110,15 @@ {error, Err} end. +received_swm_session_termination_answer(Pid, Result) -> + lager:info("ue_fsm received_swm_session_termination_answer ~p~n", [Result]), + try + gen_statem:call(Pid, {received_swm_sta, Result}) + catch + exit:Err -> + {error, Err} + end. + received_gtpc_create_session_response(Pid, Msg) -> lager:info("ue_fsm received_gtpc_create_session_response ~p~n", [Msg]), try @@ -140,12 +151,15 @@ {ok, state_new, Data}. callback_mode() -> - state_functions. + [state_functions, state_enter]. terminate(Reason, State, Data) -> lager:info("terminating ~p with reason ~p state=~p, ~p~n", [?MODULE, Reason, State, Data]), ok. +state_new(enter, _OldState, Data) -> + {keep_state, Data}; + state_new({call, From}, auth_request, Data) -> lager:info("ue_fsm state_new event=auth_request, ~p~n", [Data]), case epdg_diameter_swm:auth_request(Data#ue_fsm_data.imsi) of @@ -157,6 +171,9 @@ lager:info("ue_fsm state_new event=purge_ms_request, ~p~n", [Data]), {stop_and_reply, purge_ms_request, Data, [{reply,From,ok}]}. +state_wait_auth_resp(enter, _OldState, Data) -> + {keep_state, Data}; + state_wait_auth_resp({call, From}, {received_swm_auth_response, Auth}, Data) -> lager:info("ue_fsm state_wait_auth_resp event=received_swm_auth_response, ~p~n", [Data]), gsup_server:auth_response(Data#ue_fsm_data.imsi, Auth), @@ -169,6 +186,9 @@ {next_state, state_new, Data, [{reply,From,{error,unknown}}]} end. +state_authenticating(enter, _OldState, Data) -> + {keep_state, Data}; + state_authenticating({call, From}, lu_request, Data) -> lager:info("ue_fsm state_authenticating event=lu_request, ~p~n", [Data]), % Rx "GSUP CEAI LU Req" is our way of saying Rx "Swm Diameter-EAP REQ (DER) with EAP AVP containing successuful auth": @@ -191,6 +211,9 @@ gsup_server:lu_response(Data#ue_fsm_data.imsi, Ret), {next_state, state_authenticated, Data, [{reply,From,Ret}]}. +state_authenticated(enter, _OldState, Data) -> + {keep_state, Data}; + state_authenticated({call, From}, tunnel_request, Data) -> lager:info("ue_fsm state_authenticated event=tunnel_request, ~p~n", [Data]), epdg_gtpc_s2b:create_session_req(Data#ue_fsm_data.imsi), @@ -216,6 +239,9 @@ lager:error("ue_fsm state_authenticated: Unexpected cast event, ~p~n", [Data]), {keep_state, Data}. +state_wait_delete_session_resp(enter, _OldState, Data) -> + {keep_state, Data}; + state_wait_delete_session_resp({call, From}, {received_gtpc_delete_session_response, _Resp = #gtp{version = v2, type = delete_session_response, ie = IEs}}, Data) -> lager:info("ue_fsm state_wait_delete_session_resp event=received_gtpc_delete_session_response, ~p~n", [Data]), #{{v2_cause,0} := CauseIE} = IEs, @@ -223,11 +249,35 @@ GsupCause = conv:cause_gtp2gsup(GtpCause), lager:debug("Cause: GTP_atom=~p -> GTP_int=~p -> GSUP_int=~p~n", [CauseIE#v2_cause.v2_cause, GtpCause, GsupCause]), case GsupCause of - 0 -> gsup_server:purge_ms_response(Data#ue_fsm_data.imsi, ok); - _ -> gsup_server:purge_ms_response(Data#ue_fsm_data.imsi, {error, GsupCause}) + 0 -> Data1 = Data; + _ -> Data1 = Data#ue_fsm_data{tear_down_gsup_cause = GsupCause} + end, + {next_state, state_wait_swm_session_termination_answer, Data1, [{reply,From,ok}]}; + +state_wait_delete_session_resp({call, From}, Event, Data) -> + lager:error("ue_fsm state_wait_delete_session_resp: Unexpected call event ~p, ~p~n", [Event, Data]), + {keep_state, Data, [{reply,From,{error,unexpected_event}}]}. + +state_wait_swm_session_termination_answer(enter, _OldState, Data) -> + % TODO: Send STR towards AAA-Server + % % 3GPP TS 29.273 7.1.2.3 + lager:info("ue_fsm state_wait_swm_session_termination_answer event=enter, ~p~n", [Data]), + case epdg_diameter_swm:session_termination_request(Data#ue_fsm_data.imsi) of + ok -> {keep_state, Data}; + {error, _Err} -> + gsup_server:purge_ms_response(Data#ue_fsm_data.imsi, {error, ?GSUP_CAUSE_NET_FAIL}), + {keep_state, Data} + end; + +state_wait_swm_session_termination_answer({call, From}, {received_swm_sta, DiaResultCode}, Data) -> + lager:info("ue_fsm state_wait_swm_session_termination_answer event=received_swm_sta, ~p~n", [Data]), + case {DiaResultCode, Data#ue_fsm_data.tear_down_gsup_cause} of + {2001, 0} -> gsup_server:purge_ms_response(Data#ue_fsm_data.imsi, ok); + {2001, _} -> gsup_server:purge_ms_response(Data#ue_fsm_data.imsi, {error, Data#ue_fsm_data.tear_down_gsup_cause}); + _ -> gsup_server:purge_ms_response(Data#ue_fsm_data.imsi, {error, ?GSUP_CAUSE_NET_FAIL}) end, {keep_state, Data, [{reply,From,ok}]}; -state_wait_delete_session_resp({call, From}, Event, Data) -> +state_wait_swm_session_termination_answer({call, From}, Event, Data) -> lager:error("ue_fsm state_wait_delete_session_resp: Unexpected call event ~p, ~p~n", [Event, Data]), {keep_state, Data, [{reply,From,{error,unexpected_event}}]}. -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35737?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: I6f7554e24b26bfe191b28b56904bc8432690625d Gerrit-Change-Number: 35737 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in ...osmo-epdg[master]: Make Auth Compl procedure more similar to specs
by pespin 31 Jan '24

31 Jan '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35698?usp=email ) Change subject: Make Auth Compl procedure more similar to specs ...................................................................... Make Auth Compl procedure more similar to specs Properly document our LU Request message matching the 2nd DER in usual 3GPP architecture, which should contain the Auth RES from the MS and be forwarded up to the AAA-Server. In our architecture, the auth is handled earlier, in strongswan (part of ePDG node), hence why our LU Request contains no Auth RES info, and it's only signalled by strongswan to osmo-epdg to signal the auth completed successfuly. Make the handling of LU Req and events triggered by it asynchronous and clean up a bit some related code paths and states. Change-Id: I480c110deeb04abf1ff19147a70e10be9cbafae8 --- M src/aaa_diameter_s6b_cb.erl M src/aaa_diameter_swm.erl M src/epdg_diameter_swm.erl M src/epdg_ue_fsm.erl M src/gsup_server.erl 5 files changed, 109 insertions(+), 21 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/aaa_diameter_s6b_cb.erl b/src/aaa_diameter_s6b_cb.erl index 8651383..ccfcaff 100644 --- a/src/aaa_diameter_s6b_cb.erl +++ b/src/aaa_diameter_s6b_cb.erl @@ -57,8 +57,9 @@ #'AAR'{'Session-Id' = SessionId, 'Auth-Application-Id' = AuthAppId, 'Auth-Request-Type' = AuthReqType, - 'User-Name' = UserName} = Req, - Result = aaa_diameter_swx:server_assignment_request(UserName, 1, "internet"), + 'User-Name' = [UserName], + 'Service-Selection' = [Apn]} = Req, + Result = aaa_diameter_swx:server_assignment_request(UserName, 1, Apn), case Result of {ok, _} -> ResultCode = 2001; diff --git a/src/aaa_diameter_swm.erl b/src/aaa_diameter_swm.erl index c8ae250..f99ae91 100644 --- a/src/aaa_diameter_swm.erl +++ b/src/aaa_diameter_swm.erl @@ -14,12 +14,10 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2]). -export([code_change/3, terminate/2]). --export[(auth_request/1)]. +-export([auth_request/1, auth_compl_request/2]). -define(SERVER, ?MODULE). -% The ets table contains only IMSIs - start_link() -> gen_server:start_link({local, ?MODULE}, ?MODULE, [], []). @@ -31,6 +29,9 @@ auth_request(Imsi) -> gen_server:cast(?SERVER, {epdg_auth_req, Imsi}). +auth_compl_request(Imsi, Apn) -> + gen_server:cast(?SERVER, {epdg_auth_compl_req, Imsi, Apn}). + handle_cast({epdg_auth_req, Imsi}, State) -> % request the diameter code for a tuple CKey = [], @@ -38,11 +39,21 @@ Result = aaa_diameter_swx:multimedia_auth_request(Imsi, 1, "EAP-AKA", 1, CKey, IntegrityKey), case Result of {ok, _MAA} -> epdg_diameter_swm:auth_response(Imsi, Result); - {error, Err} -> epdg_diameter_swm:auth_response(Imsi, Result); + {error, _Err} -> epdg_diameter_swm:auth_response(Imsi, Result); _ -> epdg_diameter_swm:auth_response(Imsi, {error, unknown}) end, {noreply, State}; +handle_cast({epdg_auth_compl_req, Imsi, Apn}, State) -> + % request the diameter code for a tuple + Result = aaa_diameter_swx:server_assignment_request(Imsi, 1, Apn), + case Result of + {ok, _SAA} -> epdg_diameter_swm:auth_compl_response(Imsi, Result); + {error, _Err} -> epdg_diameter_swm:auth_compl_response(Imsi, Result); + _ -> epdg_diameter_swm:auth_compl_response(Imsi, {error, unknown}) + end, + {noreply, State}; + handle_cast(Info, S) -> error_logger:error_report(["unknown handle_cast", {module, ?MODULE}, {info, Info}, {state, S}]), {noreply, S}. diff --git a/src/epdg_diameter_swm.erl b/src/epdg_diameter_swm.erl index dbb764f..7c2043d 100644 --- a/src/epdg_diameter_swm.erl +++ b/src/epdg_diameter_swm.erl @@ -19,8 +19,8 @@ -export([init/1, handle_call/3, handle_cast/2, handle_info/2]). -export([code_change/3, terminate/2]). --export[(auth_request/1)]. --export[(auth_response/2)]. +-export([auth_request/1, auth_compl_request/2]). +-export([auth_response/2, auth_compl_response/2]). -define(SERVER, ?MODULE). @@ -42,12 +42,33 @@ _ -> Result end. +% Rx "GSUP CEAI LU Req" is our way of saying Rx "Swm Diameter-EAP REQ (DER) with EAP AVP containing successuful auth": +auth_compl_request(Imsi, Apn) -> + Result = gen_server:call(?SERVER, {epdg_auth_compl_req, Imsi, Apn}), + case Result of + {ok, _Mar} -> + epdg_ue_fsm:received_swm_auth_compl_response(self(), Result), + ok; + _ -> Result + end. + handle_call({epdg_auth_req, Imsi}, {Pid, _Tag} = _From, State0) -> % we yet don't implement the Diameter SWm interface on the wire, we process the call internally: {_Sess, State1} = find_or_new_swm_session(Imsi, Pid, State0), ok = aaa_diameter_swm:auth_request(Imsi), - {reply, ok, State1}. + {reply, ok, State1}; + +handle_call({epdg_auth_compl_req, Imsi, Apn}, _From, State) -> + % we yet don't implement the Diameter SWm interface on the wire, we process the call internally: + Sess = find_swm_session_by_imsi(Imsi, State), + case Sess of + #swm_session{imsi = Imsi} -> + Reply = aaa_diameter_swm:auth_compl_request(Imsi, Apn); + undefined -> + Reply = {error,unknown_imsi} + end, + {reply, Reply, State}. handle_cast({epdg_auth_resp, Imsi, Result}, State) -> Sess = find_swm_session_by_imsi(Imsi, State), @@ -59,6 +80,16 @@ end, {noreply, State}; +handle_cast({epdg_auth_compl_resp, Imsi, Result}, State) -> + Sess = find_swm_session_by_imsi(Imsi, State), + case Sess of + #swm_session{imsi = Imsi} -> + epdg_ue_fsm:received_swm_auth_compl_response(Sess#swm_session.pid, Result); + undefined -> + error_logger:error_report(["unknown swm_session", {module, ?MODULE}, {imsi, Imsi}, {state, State}]) + end, + {noreply, State}; + handle_cast(Info, S) -> error_logger:error_report(["unknown handle_cast", {module, ?MODULE}, {info, Info}, {state, S}]), {noreply, S}. @@ -80,6 +111,11 @@ auth_response(Imsi, Result) -> ok = gen_server:cast(?SERVER, {epdg_auth_resp, Imsi, Result}). +%Rx Swm Diameter-EAP Answer (DEA) containing APN-Configuration, triggered by +%earlier Tx DER EAP AVP containing successuful auth": +auth_compl_response(Imsi, Result) -> + ok = gen_server:cast(?SERVER, {epdg_auth_compl_resp, Imsi, Result}). + %% ------------------------------------------------------------------ %% Internal Function Definitions %% ------------------------------------------------------------------ diff --git a/src/epdg_ue_fsm.erl b/src/epdg_ue_fsm.erl index 9d20a73..1d934c5 100644 --- a/src/epdg_ue_fsm.erl +++ b/src/epdg_ue_fsm.erl @@ -40,12 +40,13 @@ -export([start_link/1]). -export([init/1,callback_mode/0,terminate/3]). -export([auth_request/1, lu_request/1, tunnel_request/1, purge_ms_request/1]). --export([received_swm_auth_response/2]). +-export([received_swm_auth_response/2, received_swm_auth_compl_response/2]). -export([received_gtpc_create_session_response/2, received_gtpc_delete_session_response/2]). --export([state_new/3, state_wait_auth_resp/3, state_authenticated/3, state_wait_delete_session_resp/3]). +-export([state_new/3, state_wait_auth_resp/3, state_authenticating/3, state_authenticated/3, state_wait_delete_session_resp/3]). -record(ue_fsm_data, { - imsi + imsi, + apn = "internet" :: string() }). start_link(Imsi) -> @@ -98,6 +99,15 @@ {error, Err} end. +received_swm_auth_compl_response(Pid, Result) -> + lager:info("ue_fsm received_swm_auth_compl_response ~p~n", [Result]), + try + gen_statem:call(Pid, {received_swm_auth_compl_response, Result}) + catch + exit:Err -> + {error, Err} + end. + received_gtpc_create_session_response(Pid, Msg) -> lager:info("ue_fsm received_gtpc_create_session_response ~p~n", [Msg]), try @@ -152,23 +162,34 @@ gsup_server:auth_response(Data#ue_fsm_data.imsi, Auth), case Auth of {ok, _} -> - {next_state, state_authenticated, Data, [{reply,From,ok}]}; + {next_state, state_authenticating, Data, [{reply,From,ok}]}; {error, Err} -> {next_state, state_new, Data, [{reply,From,{error,Err}}]}; _ -> {next_state, state_new, Data, [{reply,From,{error,unknown}}]} end. -state_authenticated({call, From}, lu_request, Data) -> - lager:info("ue_fsm state_authenticated event=lu_request, ~p~n", [Data]), - Result = aaa_diameter_swx:server_assignment_request(Data#ue_fsm_data.imsi, 1, "internet"), - gsup_server:lu_response(Data#ue_fsm_data.imsi, Result), +state_authenticating({call, From}, lu_request, Data) -> + lager:info("ue_fsm state_authenticating event=lu_request, ~p~n", [Data]), + % Rx "GSUP CEAI LU Req" is our way of saying Rx "Swm Diameter-EAP REQ (DER) with EAP AVP containing successuful auth": + case epdg_diameter_swm:auth_compl_request(Data#ue_fsm_data.imsi, Data#ue_fsm_data.apn) of + ok -> {keep_state, Data, [{reply,From,ok}]}; + {error, Err} -> {stop_and_reply, Err, Data, [{reply,From,{error,Err}}]} + end; + +% Rx Swm Diameter-EAP Answer (DEA) containing APN-Configuration, triggered by +% earlier Tx DER EAP AVP containing successuful auth", when we received GSUP LU Req: +state_authenticating({call, From}, {received_swm_auth_compl_response, Result}, Data) -> + lager:info("ue_fsm state_authenticating event=lu_request, ~p, ~p~n", [Result, Data]), + % Rx "GSUP CEAI LU Req" is our way of saying Rx "Swm Diameter-EAP REQ (DER) with EAP AVP containing successuful auth": case Result of {ok, _} -> - {keep_state, Data, [{reply,From,ok}]}; + Ret = ok; {error, Err} -> - {stop, Err, Data, [{reply,From,{error,Err}}]} - end; + Ret = {error, Err} + end, + gsup_server:lu_response(Data#ue_fsm_data.imsi, Ret), + {next_state, state_authenticated, Data, [{reply,From,Ret}]}. state_authenticated({call, From}, tunnel_request, Data) -> lager:info("ue_fsm state_authenticated event=tunnel_request, ~p~n", [Data]), diff --git a/src/gsup_server.erl b/src/gsup_server.erl index ae677c9..4d50fba 100644 --- a/src/gsup_server.erl +++ b/src/gsup_server.erl @@ -138,7 +138,7 @@ lager:info("lu_response for ~p: ~p~n", [Imsi, Result]), Socket = State#gsups_state.socket, case Result of - {ok, _Sar} -> Resp = #{message_type => location_upd_res, + ok -> Resp = #{message_type => location_upd_res, imsi => Imsi, message_class => 5 }; -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35698?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: I480c110deeb04abf1ff19147a70e10be9cbafae8 Gerrit-Change-Number: 35698 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[M] Change in ...osmo-epdg[master]: UE-initiated detach: Do STR+STA ePDG<->AAA-Server
by pespin 31 Jan '24

31 Jan '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35737?usp=email ) Change subject: UE-initiated detach: Do STR+STA ePDG<->AAA-Server ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35737?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: I6f7554e24b26bfe191b28b56904bc8432690625d Gerrit-Change-Number: 35737 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 31 Jan 2024 13:51:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[M] Change in ...osmo-epdg[master]: Make Auth Compl procedure more similar to specs
by pespin 31 Jan '24

31 Jan '24
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35698?usp=email ) Change subject: Make Auth Compl procedure more similar to specs ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/35698?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo-epdg Gerrit-Branch: master Gerrit-Change-Id: I480c110deeb04abf1ff19147a70e10be9cbafae8 Gerrit-Change-Number: 35698 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Wed, 31 Jan 2024 13:51:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: NS_Emulation: expect altstep timeout entry only if timer is running
by pespin 31 Jan '24

31 Jan '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35742?usp=email ) Change subject: NS_Emulation: expect altstep timeout entry only if timer is running ...................................................................... NS_Emulation: expect altstep timeout entry only if timer is running Should fix the following log message: NS_Emulation.ttcnpp:784 Timeout operation on timer Tns_alive failed: The timer is not started. Change-Id: If1fae965659f73fde2508b0e9158099025fa65f2 --- M library/NS_Emulation.ttcnpp 1 file changed, 14 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved fixeria: Looks good to me, but someone else must approve diff --git a/library/NS_Emulation.ttcnpp b/library/NS_Emulation.ttcnpp index d1700f8..0ed022a 100644 --- a/library/NS_Emulation.ttcnpp +++ b/library/NS_Emulation.ttcnpp @@ -781,13 +781,13 @@ } /* transition to DEAD if t_alive times out */ - [] Tns_alive.timeout { + [Tns_alive.running] Tns_alive.timeout { log("Tns-alive expired: changing to DEAD_BLOCKED + starting Tns-test"); f_change_state(NSVC_S_DEAD_BLOCKED); Tns_test.start; } - [] Tns_test.timeout { + [Tns_test.running] Tns_test.timeout { log("Tns-test expired: sending NS-ALIVE"); f_sendAlive(); } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35742?usp=email 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: If1fae965659f73fde2508b0e9158099025fa65f2 Gerrit-Change-Number: 35742 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
[S] Change in osmo-ttcn3-hacks[master]: GSUP: Fix spare and pdp_type_org fields swapped in PDPAddress IE
by pespin 31 Jan '24

31 Jan '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35743?usp=email ) Change subject: GSUP: Fix spare and pdp_type_org fields swapped in PDPAddress IE ...................................................................... GSUP: Fix spare and pdp_type_org fields swapped in PDPAddress IE A recent commit added records to separate 2 binary octets into known fields, but 2 fields filling 1 byte were actually written swapped. Fix it now. Fixes: 7b7a1e8ed16e41d95aed72a15f4ddf1857566b2e Change-Id: I884bddb0e1e5f1cfc5615c11d6c7d602d0df9224 --- M library/GSUP_Templates.ttcn M library/GSUP_Types.ttcn 2 files changed, 21 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved diff --git a/library/GSUP_Templates.ttcn b/library/GSUP_Templates.ttcn index 68e4fd1..291b59a 100644 --- a/library/GSUP_Templates.ttcn +++ b/library/GSUP_Templates.ttcn @@ -61,8 +61,8 @@ template (value) GSUP_PDP_Address ts_GSUP_PDP_Address_IPv4(template (omit) OCT4 ip_addr) := { ipv4 := { - pdp_typeorg := '0001'B, spare := '1111'B, + pdp_typeorg := '0001'B, pdp_typenum := '21'O, ipv4_address := ip_addr } diff --git a/library/GSUP_Types.ttcn b/library/GSUP_Types.ttcn index 07356f7..0bab1d6 100644 --- a/library/GSUP_Types.ttcn +++ b/library/GSUP_Types.ttcn @@ -207,30 +207,30 @@ other, OTHERWISE;)" }; type record GSUP_PDP_Address_IPv4 { - BIT4 pdp_typeorg, BIT4 spare, + BIT4 pdp_typeorg, OCT1 pdp_typenum, OCT4 ipv4_address optional }; type record GSUP_PDP_Address_IPv6 { - BIT4 pdp_typeorg, - BIT4 spare, + BIT4 spare, + BIT4 pdp_typeorg, OCT1 pdp_typenum, OCT16 ipv6_address optional }; type record GSUP_PDP_Address_IPv4v6 { - BIT4 pdp_typeorg, - BIT4 spare, + BIT4 spare, + BIT4 pdp_typeorg, OCT1 pdp_typenum, OCT4 ipv4_address optional, OCT16 ipv6_address optional }; type record GSUP_PDP_Address_unknown { - BIT4 pdp_typeorg, BIT4 spare, + BIT4 pdp_typeorg, OCT1 pdp_typenum, octetstring addr optional }; -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/35743?usp=email 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: I884bddb0e1e5f1cfc5615c11d6c7d602d0df9224 Gerrit-Change-Number: 35743 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
  • ← Newer
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • ...
  • 156
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.