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

March 2026

  • 1 participants
  • 1933 discussions
[S] Change in libosmo-sigtran[master]: m3ua: m3ua_gen_error_msg(): include Routing Context IE in cause Inval...
by pespin 30 Mar '26

30 Mar '26
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42536?usp=email to look at the new patch set (#2). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: m3ua: m3ua_gen_error_msg(): include Routing Context IE in cause Invalid Routing Context ...................................................................... m3ua: m3ua_gen_error_msg(): include Routing Context IE in cause Invalid Routing Context As per RFC4666 3.8.1: """ The "Invalid Routing Context" error is sent if a message is received from a peer with an invalid (unconfigured) Routing Context value. For this error, the invalid Routing Context(s) MUST be included in the Error message." """ Hence add the originating Routing Context IE so the error message can be further originated. For the same reason, also add the Diagnostic Information for the specific cases in the switch statement, and make them more robust about possible null pointer dereference. Change-Id: If821109701e315d17f5334c680670ea6c7bce3bd --- M src/m3ua.c 1 file changed, 16 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/36/42536/2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42536?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: If821109701e315d17f5334c680670ea6c7bce3bd Gerrit-Change-Number: 42536 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: stp: m3ua: Fix incorrect RCTX being sent in TC_combinedlset_loadshare
by osmith 30 Mar '26

30 Mar '26
Attention is currently required from: daniel, fixeria, laforge, pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42526?usp=email ) Change subject: stp: m3ua: Fix incorrect RCTX being sent in TC_combinedlset_loadshare ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42526?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Id8381a028a919a265ca330ef4f61c76637c168f6 Gerrit-Change-Number: 42526 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: daniel <dwillmann(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Mar 2026 12:20:21 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-sigtran[master]: m3ua: m3ua_gen_error_msg(): include Routing Context IE in cause Inval...
by pespin 30 Mar '26

30 Mar '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42536?usp=email ) Change subject: m3ua: m3ua_gen_error_msg(): include Routing Context IE in cause Invalid Routing Context ...................................................................... m3ua: m3ua_gen_error_msg(): include Routing Context IE in cause Invalid Routing Context As per RFC4666 3.8.1: """ The "Invalid Routing Context" error is sent if a message is received from a peer with an invalid (unconfigured) Routing Context value. For this error, the invalid Routing Context(s) MUST be included in the Error message." """ Hence add the originating Routing Context IE so the error message can be further originated. For the same reason, also add the Diagnostic Information for the specific cases in the switch statement, and make them more robust about possible null pointer dereference. Change-Id: If821109701e315d17f5334c680670ea6c7bce3bd --- M src/m3ua.c 1 file changed, 15 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/36/42536/1 diff --git a/src/m3ua.c b/src/m3ua.c index 3980bd3..368d4c3 100644 --- a/src/m3ua.c +++ b/src/m3ua.c @@ -383,7 +383,6 @@ { struct xua_msg *err = m3ua_gen_error(err_code); struct xua_msg *xua; - struct xua_msg_part *na_ie; unsigned int len_max_40; if (!err) @@ -393,18 +392,26 @@ case M3UA_ERR_INVAL_NET_APPEAR: /* Include NA IE in Error message. */ xua = xua_from_msg(M3UA_VERSION, msgb_length(msg), msgb_data(msg)); - na_ie = xua_msg_find_tag(xua, M3UA_IEI_NET_APPEAR); - xua_msg_add_data(err, M3UA_IEI_NET_APPEAR, na_ie->len, na_ie->dat); + if (xua) + xua_msg_copy_part(err, M3UA_IEI_NET_APPEAR, xua, M3UA_IEI_NET_APPEAR); + xua_msg_free(xua); + break; + case M3UA_ERR_INVAL_ROUT_CTX: + /* Include Routing Context IE if available: */ + xua = xua_from_msg(M3UA_VERSION, msgb_length(msg), msgb_data(msg)); + if (xua) + xua_msg_copy_part(err, M3UA_IEI_ROUTE_CTX, xua, M3UA_IEI_ROUTE_CTX); xua_msg_free(xua); break; default: - len_max_40 = msgb_length(msg); - if (len_max_40 > 40) - len_max_40 = 40; - - xua_msg_add_data(err, M3UA_IEI_DIAG_INFO, len_max_40, msgb_data(msg)); } + len_max_40 = msgb_length(msg); + if (len_max_40 > 40) + len_max_40 = 40; + + xua_msg_add_data(err, M3UA_IEI_DIAG_INFO, len_max_40, msgb_data(msg)); + return err; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42536?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: If821109701e315d17f5334c680670ea6c7bce3bd Gerrit-Change-Number: 42536 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: xua_asp_fsm: Include Routing Context IE in Err msg cuase Invalid Rout...
by pespin 30 Mar '26

30 Mar '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42537?usp=email ) Change subject: xua_asp_fsm: Include Routing Context IE in Err msg cuase Invalid Routing Context ...................................................................... xua_asp_fsm: Include Routing Context IE in Err msg cuase Invalid Routing Context As per RFC4666 3.8.1: """ For this error, the invalid Routing Context(s) MUST be included in the Error message. """ Change-Id: Ia8bff16248967209d73cd6d5b54ac30fda283247 --- M src/xua_asp_fsm.c 1 file changed, 14 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/37/42537/1 diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index d627795..8524c4d 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -304,7 +304,9 @@ return osmo_ss7_asp_send(asp, msg); } -static int peer_send_error(struct osmo_fsm_inst *fi, uint32_t err_code) +/* Transmit an Error MGMT message (RFC4666 3.8.1) + * rctx_be and rctx_size is raw data as obtained from originating message with "xua_msg_find_tag(xua_in, M3UA_IEI_ROUTE_CTX)" */ +static int peer_send_error_ext(struct osmo_fsm_inst *fi, uint32_t err_code, const uint8_t *rctx_be, unsigned int rctx_size) { struct xua_asp_fsm_priv *xafp = fi->priv; struct osmo_ss7_asp *asp = xafp->asp; @@ -317,6 +319,9 @@ xua->hdr.version = SUA_VERSION; xua_msg_add_u32(xua, SUA_IEI_ERR_CODE, err_code); + if (rctx_be && rctx_size > 0) + xua_msg_add_data(xua, M3UA_IEI_ROUTE_CTX, rctx_size, rctx_be); + msg = xua_to_msg(SUA_VERSION, xua); xua_msg_free(xua); if (!msg) @@ -325,6 +330,11 @@ return osmo_ss7_asp_send(asp, msg); } +static int peer_send_error(struct osmo_fsm_inst *fi, uint32_t err_code) +{ + return peer_send_error_ext(fi, err_code, NULL, 0); +} + static void xua_t_ack_cb(void *data) { struct osmo_fsm_inst *fi = data; @@ -703,13 +713,14 @@ } if ((part = xua_msg_find_tag(xua_in, M3UA_IEI_ROUTE_CTX))) { for (i = 0; i < part->len / sizeof(uint32_t); i++) { - uint32_t rctx = osmo_load32be(&part->dat[i * sizeof(uint32_t)]); + uint8_t *rctx_raw = &part->dat[i * sizeof(uint32_t)]; + uint32_t rctx = osmo_load32be(rctx_raw); as = ss7_asp_find_as_by_rctx(asp, rctx); if (!as) { LOGPFSML(fi, LOGL_NOTICE, "ASPAC: Couldn't find any AS with rctx=%u. Check your config!\n", rctx); - peer_send_error(fi, M3UA_ERR_INVAL_ROUT_CTX); + peer_send_error_ext(fi, M3UA_ERR_INVAL_ROUT_CTX, rctx_raw, sizeof(uint32_t)); return; } } -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42537?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Ia8bff16248967209d73cd6d5b54ac30fda283247 Gerrit-Change-Number: 42537 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ci[master]: OBS: nightly: add ".0" after versions on git tags
by osmith 30 Mar '26

30 Mar '26
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ci/+/42535?usp=email to look at the new patch set (#2). Change subject: OBS: nightly: add ".0" after versions on git tags ...................................................................... OBS: nightly: add ".0" after versions on git tags Fix that with the current logic of generating version numbers for nightly, a version done on a tag can be higher than the following version: on tag: 1.14.0.202603231800 on tag (with this patch): 1.14.0.0.202603231800 next commit after the tag: 1.14.0.1.abcd.202603241800 Fixes: OS#6981 Change-Id: Id140d8ea76bf98357711587a9909d54097250fd6 --- M scripts/obs/lib/srcpkg.py 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/35/42535/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42535?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Id140d8ea76bf98357711587a9909d54097250fd6 Gerrit-Change-Number: 42535 Gerrit-PatchSet: 2 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[XS] Change in osmo-ci[master]: OBS: nightly: add ".0" after versions on git tags
by osmith 30 Mar '26

30 Mar '26
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ci/+/42535?usp=email ) Change subject: OBS: nightly: add ".0" after versions on git tags ...................................................................... OBS: nightly: add ".0" after versions on git tags Fix that with the current logic of generating version numbers for nightly, a version done on a tag can be higher than the following version: on tag: 1.14.0.202603231800 # <tag>.<YY><MM><DD><HH><mm><SS> on tag (with this patch): 1.14.0.0.202603231800 # <tag>.0.<YY><MM><DD><HH><mm><SS> next commit after the tag: 1.14.0.1.2016.202603241800 # <tag>.<patch-count-since-last-tag>.<commit-hash>.<YY><MM><DD><HH><mm><SS> Fixes: OS#6981 Change-Id: Id140d8ea76bf98357711587a9909d54097250fd6 --- M scripts/obs/lib/srcpkg.py 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/35/42535/1 diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py index b3e0422..8ed50df 100644 --- a/scripts/obs/lib/srcpkg.py +++ b/scripts/obs/lib/srcpkg.py @@ -106,6 +106,12 @@ if ":" in ret: ret = ret.split(":")[1] + # Nightly: add a ".0" after the version if the current commit is on a + # version tag, so the next version is higher (OS#6981) + if lib.args.feed == "nightly": + while ret.count(".") < 3: + ret += ".0" + # Append the conflict_version to increase the version even if the commit # did not change (OS#5135) conflict_version = lib.args.conflict_version -- To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/42535?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ci Gerrit-Branch: master Gerrit-Change-Id: Id140d8ea76bf98357711587a9909d54097250fd6 Gerrit-Change-Number: 42535 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: pgw: Test v6 and v4v6 PDU session userplane
by pespin 30 Mar '26

30 Mar '26
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42501?usp=email ) Change subject: pgw: Test v6 and v4v6 PDU session userplane ...................................................................... pgw: Test v6 and v4v6 PDU session userplane Change-Id: Idf009b9118db8117c547a1bb0f27afdfa3f03924 --- M library/GTPv2_Templates.ttcn M pgw/PGW_Tests.cfg M pgw/PGW_Tests.ttcn M pgw/expected-results.xml M pgw/open5gs-smf.yaml M pgw/open5gs-upf.yaml M pgw/testenv.sh 7 files changed, 220 insertions(+), 42 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve pespin: Looks good to me, approved osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/library/GTPv2_Templates.ttcn b/library/GTPv2_Templates.ttcn index 539251c..d318ace 100644 --- a/library/GTPv2_Templates.ttcn +++ b/library/GTPv2_Templates.ttcn @@ -388,7 +388,21 @@ ts_GTP2C_PdnAddrAlloc('001'B, {iPv4_Address:=addr}); template (present) PDN_AddressAllocation tr_GTP2C_PdnAddrAlloc_v4(template (present) OCT4 addr) := - ts_GTP2C_PdnAddrAlloc('001'B, {iPv4_Address:=addr}); + tr_GTP2C_PdnAddrAlloc('001'B, {iPv4_Address:=addr}); + +template (value) PDN_AddressAllocation +ts_GTP2C_PdnAddrAlloc_v6(template (value) IPv6 addr) := + ts_GTP2C_PdnAddrAlloc('010'B, {iPv6_Address:=addr}); +template (present) PDN_AddressAllocation +tr_GTP2C_PdnAddrAlloc_v6(template (present) IPv6 addr) := + tr_GTP2C_PdnAddrAlloc('010'B, {iPv6_Address:=addr}); + +template (value) PDN_AddressAllocation +ts_GTP2C_PdnAddrAlloc_v4v6(template (value) IPv4_IPv6 addr) := + ts_GTP2C_PdnAddrAlloc('011'B, {iPv4_IPv6:=addr}); +template (present) PDN_AddressAllocation +tr_GTP2C_PdnAddrAlloc_v4v6(template (present) IPv4_IPv6 addr) := + tr_GTP2C_PdnAddrAlloc('011'B, {iPv4_IPv6:=addr}); /* 8.15 */ template (value) Bearer_QoS @@ -903,6 +917,27 @@ tr_PDU_GTP2C(omit, seq, { echoResponse := ? }, omit); +private function f_ts_PDN_AddressAllocation_request(template (value) BIT3 pdn_type) +return template (value) PDN_AddressAllocation +{ + var template (value) PDN_AddressAllocation paa; + select (valueof(pdn_type)) { + case ('001'B) { + paa := ts_GTP2C_PdnAddrAlloc_v4('00000000'O); + } + case ('010'B) { + paa := ts_GTP2C_PdnAddrAlloc_v6({ prefixLength := 64, + iPv6_Address := '00000000000000000000000000000000'O }); + } + case ('011'B) { + paa := ts_GTP2C_PdnAddrAlloc_v4v6({ prefixLength := 64, + iPv6_Address := '00000000000000000000000000000000'O, + iPv4_Address := '00000000'O }); + } + } + + return paa; +} template (present) PDU_GTPCv2 ts_GTP2C_CreateSessionReq(template (value) hexstring imsi, template (omit) hexstring msisdn, @@ -926,7 +961,7 @@ accessPointName := ts_GTP2C_APN(apn), selectionMode := ts_GTP2C_SelectionMode(0), pDN_Type := ts_GTP2C_PdnType(pdn_type), - pDN_AddressAllocation := ts_GTP2C_PdnAddrAlloc('001'B, {iPv4_Address:='00000000'O}), + pDN_AddressAllocation := f_ts_PDN_AddressAllocation_request(pdn_type), maxAPN_Restriction := ts_GTP2C_ApnRestriction(0), ambr := ts_GTP2C_Ambr(102400, 102400), linkedEPS_Bearer_ID := omit, diff --git a/pgw/PGW_Tests.cfg b/pgw/PGW_Tests.cfg index 68688c1..d280a6d 100644 --- a/pgw/PGW_Tests.cfg +++ b/pgw/PGW_Tests.cfg @@ -17,6 +17,7 @@ PGW_Tests.mp_run_prog_log_path := "./run_prog" PGW_Tests.mp_run_prog_as_user := "osmocom" # testenv.sh sets this to $USER PGW_Tests.mp_ping_hostname := "10.45.0.1" +PGW_Tests.mp_ping_hostname6 := "cafe::1" PGW_Tests.mp_pcrf_local_ip:= "127.0.0.202" PGW_Tests.mp_ocs_local_ip:= "127.0.0.202" PGW_Tests.mp_aaa_local_ip:= "127.0.0.202" diff --git a/pgw/PGW_Tests.ttcn b/pgw/PGW_Tests.ttcn index a670881..85d5820 100644 --- a/pgw/PGW_Tests.ttcn +++ b/pgw/PGW_Tests.ttcn @@ -35,6 +35,7 @@ charstring mp_run_prog_log_path := "/tmp"; charstring mp_run_prog_as_user := "laforge"; charstring mp_ping_hostname := "10.45.0.1"; + charstring mp_ping_hostname6 := "cafe::1"; charstring mp_pcrf_local_ip := "127.0.0.9"; integer mp_pcrf_local_port := 3868; @@ -117,8 +118,8 @@ /* Address allocation */ var OCT4 g_ip4_addr; + var OCT8 g_ip6_interface_id; var OCT16 g_ip6_addr; - var integer g_ip6_plen; /* Store last received Gy message */ var PDU_DIAMETER g_rx_gy; @@ -674,6 +675,58 @@ return omit; } +private function f_create_sess_tun() runs on PGW_Session_CT +{ + var template (value) UECUPS_AddrType user_addr_type; + var template (value) OCT4_20n user_addr; + + select (g_pars.pdn_type) { + case (GTP2C_PDN_IPv4) { + user_addr_type := IPV4; + user_addr := g_ip4_addr; + } + case (GTP2C_PDN_IPv6) { + user_addr_type := IPV6; + user_addr := g_ip6_addr; + } + case (GTP2C_PDN_IPv4v6) { + user_addr_type := IPV4V6; + user_addr := g_ip4_addr & g_ip6_addr; + } + } + + var template (value) UECUPS_CreateTun uecups_create := ts_UECUPS_CreateTun( + tx_teid := oct2int(g_pars.bearer.teid_remote), + rx_teid := oct2int(g_pars.bearer.teid_local), + user_addr_type := user_addr_type, + user_addr := user_addr, + local_gtp_ep := ts_UECUPS_SockAddr(f_inet_addr(mp_local_hostname_u)), + remote_gtp_ep := ts_UECUPS_SockAddr(g_gtpu4_remote), + tun_dev_name := g_pars.tun_dev_name, + tun_netns_name := g_pars.tun_netns_name + ); + + /* create tunnel in daemon */ + f_gtp1u_create_tunnel(uecups_create); +} + +private function f_perform_ipv6_slaac() runs on PGW_Session_CT +{ + var UECUPS_IPv6SLAACInd ipv6slaac_ind; + var template (value) UECUPS_IPv6SLAAC ipv6slaac; + ipv6slaac := ts_UECUPS_IPv6SLAAC( + local_gtp_ep := ts_UECUPS_SockAddr(f_inet_addr(mp_local_hostname_u)), + rx_teid := oct2int(g_pars.bearer.teid_local) + ); + f_gtp1u_ipv6_slaac(ipv6slaac); + GTP1U[0].receive(UECUPS_IPv6SLAACInd:?) -> value ipv6slaac_ind; + log("5GC assigned IPv6 global prefix: ", ipv6slaac_ind.ipv6_prefix, " -> ", f_inet6_ntoa(ipv6slaac_ind.ipv6_prefix & '0000000000000000'O)); + + /* Use the first global IPv6 address in the IPv6 prefix picked by osmo-uecups: */ + g_ip6_addr := ipv6slaac_ind.ipv6_user_addr; + log("Using IPv6 global address: ", g_ip6_addr); +} + /* process one to-be-created bearer context */ private function process_bctx_create(BearerContextGrouped bctx) runs on PGW_Session_CT { @@ -702,26 +755,10 @@ g_gtpu6_remote := rx_fteid.iPv6_Address; } - var template (value) UECUPS_CreateTun uecups_create := ts_UECUPS_CreateTun( - tx_teid := oct2int(g_pars.bearer.teid_remote), - rx_teid := oct2int(g_pars.bearer.teid_local), - user_addr_type := IPV4, - user_addr := '00000000'O, - local_gtp_ep := valueof(ts_UECUPS_SockAddr(f_inet_addr(mp_local_hostname_u))), - remote_gtp_ep := valueof(ts_UECUPS_SockAddr(g_gtpu4_remote)), - tun_dev_name := g_pars.tun_dev_name, - tun_netns_name := g_pars.tun_netns_name - ); - - /* create tunnel in daemon */ - if (isbound(g_ip4_addr)) { - uecups_create.user_addr := g_ip4_addr; - f_gtp1u_create_tunnel(uecups_create); - } - if (isbound(g_ip6_addr)) { - uecups_create.user_addr_type := IPV6; - uecups_create.user_addr := g_ip6_addr; - f_gtp1u_create_tunnel(uecups_create); + f_create_sess_tun(); + if (g_pars.pdn_type == GTP2C_PDN_IPv6 or + g_pars.pdn_type == GTP2C_PDN_IPv4v6) { + f_perform_ipv6_slaac(); } } @@ -780,13 +817,29 @@ var PDN_Address_and_Prefix paa := resp.pDN_AddressAllocation.pDN_Address_and_Prefix; if (ischosen(paa.iPv4_Address)) { g_ip4_addr := paa.iPv4_Address; + log("PGW assigned UE IPv4 address: ", f_inet_ntoa(g_ip4_addr)); } else if (ischosen(paa.iPv6_Address)) { - g_ip6_addr := paa.iPv6_Address.iPv6_Address; - g_ip6_plen := paa.iPv6_Address.prefixLength; + if (paa.iPv6_Address.prefixLength != 64) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Got IPv6 Prefix Length ", + paa.iPv6_Address.prefixLength, " vs exp 64")); + } + g_ip6_interface_id := substr(paa.iPv6_Address.iPv6_Address, 8, 8); + log("PGW assigned IPv6 Interface Id: ", g_ip6_interface_id); + g_ip6_addr := 'FE80000000000000'O & g_ip6_interface_id; + log("PGW assigned IPv6 link-local Address: ", f_inet6_ntoa(g_ip6_addr)); } else if (ischosen(paa.iPv4_IPv6)) { + if (paa.iPv4_IPv6.prefixLength != 64) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Got IPv6 Prefix Length ", + paa.iPv4_IPv6.prefixLength, " vs exp 64")); + } g_ip4_addr := paa.iPv4_IPv6.iPv4_Address; - g_ip6_addr := paa.iPv4_IPv6.iPv6_Address; - g_ip6_plen := paa.iPv4_IPv6.prefixLength; + log("PGW assigned UE IPv4 address: ", f_inet_ntoa(g_ip4_addr)); + g_ip6_interface_id := substr(paa.iPv4_IPv6.iPv6_Address, 8, 8); + log("PGW assigned IPv6 Interface Id: ", g_ip6_interface_id); + g_ip6_addr := 'FE80000000000000'O & g_ip6_interface_id; + log("PGW assigned IPv6 link-local Address: ", f_inet6_ntoa(g_ip6_addr)); } var integer i; for (i := 0; i < lengthof(resp.bearerContextGrouped); i := i+1) { @@ -920,14 +973,19 @@ } /* execute ping command and wait for result */ -private function f_ping4(charstring host, integer interval := 1, integer count := 10) runs on PGW_Session_CT +private function f_ping(charstring host, integer interval := 1, integer count := 10) runs on PGW_Session_CT { - if (not isbound(g_ip4_addr)) { - Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, "f_ping4(): g_ip4_addr is unset!"); - } - /* command will be filled in by f_gtp1u_ping() below: */ + /* command will be filled in by f_gtp1u_ping4() below: */ var UECUPS_StartProgram sprog := f_run_prog_init(""); - f_gtp1u_ping(sprog, host, interval, count, f_inet_ntoa(g_ip4_addr), + var charstring bind_addr; + + if (f_addr_is_ipv6(host)) { + bind_addr := f_inet6_ntoa(g_ip6_addr); + } else { + bind_addr := f_inet_ntoa(g_ip4_addr); + } + + f_gtp1u_ping(sprog, host, interval, count, bind_addr, redirect_output := true, redirect_output_path_prefix := f_run_prog_unique_log_path()); } @@ -957,21 +1015,25 @@ } testcase TC_createSession() runs on PGW_Test_CT { var PGW_Session_CT vc_conn; - var SessionPars pars := valueof(t_SessionPars('001010123456789'H, "tun22")); + var SessionPars pars := valueof(t_SessionPars('001010123456789'H, + "tun22", + pdn_type := GTP2C_PDN_IPv4)); f_init(); vc_conn := f_start_handler(refers(f_TC_createSession), pars); vc_conn.done; } -/* create a session, then execute a ping command on the user plane */ +/* create a IPv4 session, then execute a ping command on the user plane */ private function f_TC_createSession_ping4() runs on PGW_Session_CT { f_s5s8_create_session(); - f_ping4(mp_ping_hostname); + f_ping(mp_ping_hostname); setverdict(pass); } testcase TC_createSession_ping4() runs on PGW_Test_CT { var PGW_Session_CT vc_conn; - var SessionPars pars := valueof(t_SessionPars('001010123456789'H, "tun23")); + var SessionPars pars := valueof(t_SessionPars('001010123456789'H, + "tun23", + pdn_type := GTP2C_PDN_IPv4)); f_init(); vc_conn := f_start_handler(refers(f_TC_createSession_ping4), pars); vc_conn.done; @@ -993,6 +1055,74 @@ } } +/* create a IPv6 session, then execute a ping command on the user plane */ +private function f_TC_createSession_ping6() runs on PGW_Session_CT { + f_s5s8_create_session(); + f_ping(mp_ping_hostname6); + setverdict(pass); +} +testcase TC_createSession_ping6() runs on PGW_Test_CT { + var PGW_Session_CT vc_conn; + var SessionPars pars := valueof(t_SessionPars('001010123456789'H, + "tun23", + pdn_type := GTP2C_PDN_IPv6)); + f_init(); + vc_conn := f_start_handler(refers(f_TC_createSession_ping6), pars); + vc_conn.done; +} +testcase TC_createSession_ping6_256() runs on PGW_Test_CT { + var PGW_Session_CT vc_conn[256]; + var integer i; + + f_init(); + + for (i := 0; i < sizeof(vc_conn); i:=i+1) { + var charstring tundev := "ping" & int2str(i); + var SessionPars pars := valueof(t_SessionPars(f_gen_imsi(i), + tundev, + pdn_type := GTP2C_PDN_IPv6)); + vc_conn[i] := f_start_handler(refers(f_TC_createSession_ping6), pars); + } + + for (i := 0; i < lengthof(vc_conn); i:=i+1) { + vc_conn[i].done; + } +} + +/* create a IPv4v6 session, then execute a ping command on the user plane */ +private function f_TC_createSession_ping46() runs on PGW_Session_CT { + f_s5s8_create_session(); + f_ping(mp_ping_hostname); + f_ping(mp_ping_hostname6); + setverdict(pass); +} +testcase TC_createSession_ping46() runs on PGW_Test_CT { + var PGW_Session_CT vc_conn; + var SessionPars pars := valueof(t_SessionPars('001010123456789'H, + "tun23", + pdn_type := GTP2C_PDN_IPv4v6)); + f_init(); + vc_conn := f_start_handler(refers(f_TC_createSession_ping46), pars); + vc_conn.done; +} +testcase TC_createSession_ping46_256() runs on PGW_Test_CT { + var PGW_Session_CT vc_conn[256]; + var integer i; + + f_init(); + + for (i := 0; i < sizeof(vc_conn); i:=i+1) { + var charstring tundev := "ping" & int2str(i); + var SessionPars pars := valueof(t_SessionPars(f_gen_imsi(i), + tundev, + pdn_type := GTP2C_PDN_IPv4v6)); + vc_conn[i] := f_start_handler(refers(f_TC_createSession_ping46), pars); + } + + for (i := 0; i < lengthof(vc_conn); i:=i+1) { + vc_conn[i].done; + } +} /* create a session, then delete it again */ private function f_TC_createSession_deleteSession() runs on PGW_Session_CT { @@ -1033,7 +1163,7 @@ f_validate_gy_cc_report(g_rx_gy, VALIDITY_TIME, (3..4), 0, 0); d := activate(as_DIA_Gy_CCR(UPDATE_REQUEST)); - f_ping4(mp_ping_hostname); + f_ping(mp_ping_hostname); /* Let the CCA reach the PGW */ f_sleep(0.5); deactivate(d); @@ -1126,6 +1256,10 @@ execute( TC_createSession() ); execute( TC_createSession_ping4() ); execute( TC_createSession_ping4_256() ); + execute( TC_createSession_ping6() ); + execute( TC_createSession_ping6_256() ); + execute( TC_createSession_ping46() ); + execute( TC_createSession_ping46_256() ); execute( TC_createSession_deleteSession() ); execute( TC_deleteSession_unknown() ); execute( TC_gy_charging_cc_time() ); diff --git a/pgw/expected-results.xml b/pgw/expected-results.xml index 3945b4d..459e59c 100644 --- a/pgw/expected-results.xml +++ b/pgw/expected-results.xml @@ -4,6 +4,10 @@ <testcase classname='PGW_Tests' name='TC_createSession' time='MASKED'/> <testcase classname='PGW_Tests' name='TC_createSession_ping4' time='MASKED'/> <testcase classname='PGW_Tests' name='TC_createSession_ping4_256' time='MASKED'/> + <testcase classname='PGW_Tests' name='TC_createSession_ping6' time='MASKED'/> + <testcase classname='PGW_Tests' name='TC_createSession_ping6_256' time='MASKED'/> + <testcase classname='PGW_Tests' name='TC_createSession_ping46' time='MASKED'/> + <testcase classname='PGW_Tests' name='TC_createSession_ping46_256' time='MASKED'/> <testcase classname='PGW_Tests' name='TC_createSession_deleteSession' time='MASKED'/> <testcase classname='PGW_Tests' name='TC_deleteSession_unknown' time='MASKED'/> <testcase classname='PGW_Tests' name='TC_gy_charging_cc_time' time='MASKED'/> diff --git a/pgw/open5gs-smf.yaml b/pgw/open5gs-smf.yaml index 49ec84b..34aabc3 100644 --- a/pgw/open5gs-smf.yaml +++ b/pgw/open5gs-smf.yaml @@ -49,8 +49,8 @@ - subnet: 10.45.0.0/16 gateway: 10.45.0.1 dnn: internet - - subnet: cafe::/64 - gateway: cafe::1 + - subnet: 2001:db8:cafe::/48 + gateway: 2001:db8:cafe::1 dnn: internet dns: - 8.8.8.8 diff --git a/pgw/open5gs-upf.yaml b/pgw/open5gs-upf.yaml index e65914e..39c47d5 100644 --- a/pgw/open5gs-upf.yaml +++ b/pgw/open5gs-upf.yaml @@ -22,8 +22,8 @@ gateway: 10.45.0.1 dnn: internet dev: ogstun46 - - subnet: cafe::/64 - gateway: cafe::1 + - subnet: 2001:db8:cafe::/48 + gateway: 2001:db8:cafe::1 dnn: internet dev: ogstun46 diff --git a/pgw/testenv.sh b/pgw/testenv.sh index 2abf999..7f155d1 100755 --- a/pgw/testenv.sh +++ b/pgw/testenv.sh @@ -46,6 +46,10 @@ sudo ip link set ogstun4 up sudo ip link set ogstun6 up sudo ip link set ogstun46 up + + # The IPv4 route is added automatically when setting the interface addr above: + sudo ip route add "10.45.0.0/16" dev "ogstun46" || true + sudo ip -6 route add "2001:db8:cafe::/48" dev "ogstun46" || true } del_tun() { -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42501?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idf009b9118db8117c547a1bb0f27afdfa3f03924 Gerrit-Change-Number: 42501 Gerrit-PatchSet: 3 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-CC: laforge <laforge(a)osmocom.org>
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: pgw: Test v6 and v4v6 PDU session userplane
by pespin 30 Mar '26

30 Mar '26
Attention is currently required from: laforge. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42501?usp=email ) Change subject: pgw: Test v6 and v4v6 PDU session userplane ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42501?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idf009b9118db8117c547a1bb0f27afdfa3f03924 Gerrit-Change-Number: 42501 Gerrit-PatchSet: 2 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-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Mon, 30 Mar 2026 11:52:16 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: pgw: Test v6 and v4v6 PDU session userplane
by osmith 30 Mar '26

30 Mar '26
Attention is currently required from: laforge, pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42501?usp=email ) Change subject: pgw: Test v6 and v4v6 PDU session userplane ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/42501?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Idf009b9118db8117c547a1bb0f27afdfa3f03924 Gerrit-Change-Number: 42501 Gerrit-PatchSet: 2 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-CC: laforge <laforge(a)osmocom.org> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Mon, 30 Mar 2026 11:38:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-sigtran[master]: xua: Split traffic mode readonly validation from internal state update
by pespin 30 Mar '26

30 Mar '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/42529?usp=email ) Change subject: xua: Split traffic mode readonly validation from internal state update ...................................................................... xua: Split traffic mode readonly validation from internal state update First validate the whole message, then once evyerthing is fine, act on the message updating internal state. Change-Id: I05ba891e774ebe341229b968c92e0383b6899bd6 --- M src/xua_asp_fsm.c M src/xua_rkm.c 2 files changed, 31 insertions(+), 16 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/29/42529/1 diff --git a/src/xua_asp_fsm.c b/src/xua_asp_fsm.c index 913f0e8..5cb28fc 100644 --- a/src/xua_asp_fsm.c +++ b/src/xua_asp_fsm.c @@ -641,6 +641,7 @@ struct xua_asp_fsm_priv *xafp = fi->priv; struct osmo_ss7_asp *asp = xafp->asp; struct osmo_ss7_as *as; + struct ss7_as_asp_assoc *assoc; struct xua_msg_part *asp_id_ie; struct xua_msg *xua_in; uint32_t traf_mode = 0; @@ -715,8 +716,16 @@ } if (traf_mode) { /* if the peer has specified a traffic mode at all */ + /* First validate peer not trying to establish an incompatible traffic mode: */ + llist_for_each_entry(assoc, &asp->assoc_as_list, asp_entry) { + if (!osmo_ss7_as_tmode_compatible_xua(assoc->as, traf_mode)) { + peer_send_error(fi, M3UA_ERR_UNSUPP_TRAF_MOD_TYP); + return; + } + } + + /* Update traffic mode in all AS associated with the ASP: */ enum osmo_ss7_as_traffic_mode tmode = osmo_ss7_tmode_from_xua(traf_mode); - struct ss7_as_asp_assoc *assoc; llist_for_each_entry(assoc, &asp->assoc_as_list, asp_entry) { as = assoc->as; if (!as->cfg.mode_set_by_peer && !as->cfg.mode_set_by_vty) { @@ -724,9 +733,6 @@ LOGPAS(as, DLSS7, LOGL_INFO, "ASPAC: Traffic mode set dynamically by peer to %s\n", osmo_ss7_as_traffic_mode_name(as->cfg.mode)); - } else if (!osmo_ss7_as_tmode_compatible_xua(as, traf_mode)) { - peer_send_error(fi, M3UA_ERR_UNSUPP_TRAF_MOD_TYP); - return; } as->cfg.mode_set_by_peer = true; } diff --git a/src/xua_rkm.c b/src/xua_rkm.c index 22bcafe..d6dfa51 100644 --- a/src/xua_rkm.c +++ b/src/xua_rkm.c @@ -172,6 +172,7 @@ uint32_t rk_id, rctx, _tmode, dpc; enum osmo_ss7_as_traffic_mode tmode; struct osmo_ss7_as *as; + struct ss7_as_asp_assoc *assoc; struct osmo_ss7_route *rt; char namebuf[32]; bool as_already_in_array; @@ -264,19 +265,27 @@ } if (_tmode) { /* if the peer has specified a traffic mode at all */ tmode = osmo_ss7_tmode_from_xua(_tmode); - if (!as->cfg.mode_set_by_peer && !as->cfg.mode_set_by_vty) { - as->cfg.mode = tmode; - LOGPAS(as, DLSS7, LOGL_INFO, - "RKM: Traffic mode set dynamically by peer to %s\n", - osmo_ss7_as_traffic_mode_name(as->cfg.mode)); - /* verify if existing AS has same traffic-mode as new request (if any) */ - } else if (!osmo_ss7_as_tmode_compatible_xua(as, _tmode)) { - LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: Non-matching Traffic Mode %s\n", - osmo_ss7_as_traffic_mode_name(tmode)); - msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_UNSUPP_TRAF_MODE, 0); - return -1; + /* First validate peer not trying to establish an incompatible traffic mode: */ + llist_for_each_entry(assoc, &asp->assoc_as_list, asp_entry) { + if (!osmo_ss7_as_tmode_compatible_xua(assoc->as, _tmode)) { + LOGPASP(asp, DLSS7, LOGL_NOTICE, "RKM: Non-matching Traffic Mode %s\n", + osmo_ss7_as_traffic_mode_name(tmode)); + msgb_append_reg_res(resp, rk_id, M3UA_RKM_REG_ERR_UNSUPP_TRAF_MODE, 0); + return -1; + } } - as->cfg.mode_set_by_peer = true; + + /* Update traffic mode in all AS associated with the ASP: */ + llist_for_each_entry(assoc, &asp->assoc_as_list, asp_entry) { + as = assoc->as; + if (!as->cfg.mode_set_by_peer && !as->cfg.mode_set_by_vty) { + as->cfg.mode = tmode; + LOGPAS(as, DLSS7, LOGL_INFO, + "RKM: Traffic mode set dynamically by peer to %s\n", + osmo_ss7_as_traffic_mode_name(as->cfg.mode)); + } + as->cfg.mode_set_by_peer = true; + } } } else { /* Create an AS for this routing key */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/42529?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I05ba891e774ebe341229b968c92e0383b6899bd6 Gerrit-Change-Number: 42529 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • ...
  • 194
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.