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

October 2024

  • 1 participants
  • 1631 discussions
[M] Change in osmo-ggsn[master]: ggsn: Support announcing APN MTU over PCO
by pespin 21 Oct '24

21 Oct '24
Attention is currently required from: fixeria, laforge, osmith. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38457?usp=email ) Change subject: ggsn: Support announcing APN MTU over PCO ...................................................................... Patch Set 4: (4 comments) File ggsn/ggsn.h: https://gerrit.osmocom.org/c/osmo-ggsn/+/38457/comment/e4591f7e_4f4da016?us… : PS4, Line 36: #define IPV6_HDR_MAX_SIZE 40 /* Assume no extension headers in general... */ > IPV6_HDR_MAX_SIZE < IPV4_HDR_MAX_SIZE, is this correct? Yes because we assume no extension headers used by ipv6, while we account for maximum number of extension headers for ipv4. File ggsn/ggsn_vty.c: https://gerrit.osmocom.org/c/osmo-ggsn/+/38457/comment/bdfe5efe_40d5d22f?us… : PS4, Line 425: "mtu (<0-1464>|default)", > maybe use MAX_POSSIBLE_APN_MTU instead of 1464 here? It cannot be done, I already tried once. The preprocessor puts there the expression, not the result, hence not a number. https://gerrit.osmocom.org/c/osmo-ggsn/+/38457/comment/bf4f1435_19dbf5d1?us… : PS4, Line 428: "Default value of the MTU of the APN (1420)") > maybe use MAX_DESIRED_APN_MTU instead of 1420 here? It cannot be done, I already tried once. The preprocessor puts there the expression, not the result, hence not a number. https://gerrit.osmocom.org/c/osmo-ggsn/+/38457/comment/6f1ad165_7addd094?us… : PS4, Line 708: vty_out(vty, " mtu %" PRIu16 "%s", apn->cfg.mtu, VTY_NEWLINE); > skip if == default? I'd rather keep it like this, I think it's actually a good idea to always print it, the default is not obvious at all and may need some tweaking sometimes... -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38457?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I8532acfffadda9e83962b30e4f6b17eb8b3362ac Gerrit-Change-Number: 38457 Gerrit-PatchSet: 4 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: osmith <osmith(a)sysmocom.de> Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Attention: laforge <laforge(a)osmocom.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Mon, 21 Oct 2024 12:00:11 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: osmith <osmith(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-ggsn[master]: ggsn: Support announcing APN MTU over PCO
by osmith 21 Oct '24

21 Oct '24
Attention is currently required from: fixeria, laforge, pespin. osmith has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38457?usp=email ) Change subject: ggsn: Support announcing APN MTU over PCO ...................................................................... Patch Set 4: (4 comments) File ggsn/ggsn.h: https://gerrit.osmocom.org/c/osmo-ggsn/+/38457/comment/f7c1de3d_52d75ed8?us… : PS4, Line 36: #define IPV6_HDR_MAX_SIZE 40 /* Assume no extension headers in general... */ IPV6_HDR_MAX_SIZE < IPV4_HDR_MAX_SIZE, is this correct? File ggsn/ggsn_vty.c: https://gerrit.osmocom.org/c/osmo-ggsn/+/38457/comment/7ab6b54d_b90aa385?us… : PS4, Line 425: "mtu (<0-1464>|default)", maybe use MAX_POSSIBLE_APN_MTU instead of 1464 here? https://gerrit.osmocom.org/c/osmo-ggsn/+/38457/comment/91aa4727_3d3dda0d?us… : PS4, Line 428: "Default value of the MTU of the APN (1420)") maybe use MAX_DESIRED_APN_MTU instead of 1420 here? https://gerrit.osmocom.org/c/osmo-ggsn/+/38457/comment/814a6aba_324df9f5?us… : PS4, Line 708: vty_out(vty, " mtu %" PRIu16 "%s", apn->cfg.mtu, VTY_NEWLINE); skip if == default? -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38457?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I8532acfffadda9e83962b30e4f6b17eb8b3362ac Gerrit-Change-Number: 38457 Gerrit-PatchSet: 4 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: 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-Comment-Date: Mon, 21 Oct 2024 11:49:24 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No
1 0
0 0
[M] Change in osmo-ggsn[master]: ggsn: Support announcing APN MTU over PCO
by pespin 21 Oct '24

21 Oct '24
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38457?usp=email ) Change subject: ggsn: Support announcing APN MTU over PCO ...................................................................... Patch Set 4: This change is ready for review. -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38457?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I8532acfffadda9e83962b30e4f6b17eb8b3362ac Gerrit-Change-Number: 38457 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Comment-Date: Mon, 21 Oct 2024 11:36:43 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No
1 0
0 0
[S] Change in libgtpnl[master]: Bump version: 1.3.0.4-b968 → 1.3.1
by osmith 21 Oct '24

21 Oct '24
osmith has submitted this change. ( https://gerrit.osmocom.org/c/libgtpnl/+/38477?usp=email ) Change subject: Bump version: 1.3.0.4-b968 → 1.3.1 ...................................................................... Bump version: 1.3.0.4-b968 → 1.3.1 Change-Id: Iba3b7a3b4f519be39808d03617967bb7027c6735 --- M debian/changelog M src/Makefile.am 2 files changed, 15 insertions(+), 1 deletion(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/debian/changelog b/debian/changelog index 9aba358..61e0d29 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +libgtpnl (1.3.1) unstable; urgency=medium + + [ Eric Wild ] + * fix clang build + + [ Jan Engelhardt ] + * Revert `configure: regular_C(PP)FLAGS -> C(PP)FLAGS` + * build: fix bashims in configure.ac + + [ Pau Espin Pedrol ] + * dev_create: Avoid passing IFLA_GTP_FD* attribute with value -1 + + -- Oliver Smith <osmith(a)sysmocom.de> Mon, 21 Oct 2024 13:31:29 +0200 + libgtpnl (1.3.0) unstable; urgency=medium [ Oliver Smith ] diff --git a/src/Makefile.am b/src/Makefile.am index fbc7579..57c87d5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification -LIBVERSION=2:0:2 +LIBVERSION=2:1:2 lib_LTLIBRARIES = libgtpnl.la -- To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/38477?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Change-Id: Iba3b7a3b4f519be39808d03617967bb7027c6735 Gerrit-Change-Number: 38477 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libgtpnl[master]: Bump version: 1.3.0.4-b968 → 1.3.1
by pespin 21 Oct '24

21 Oct '24
Attention is currently required from: osmith. pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libgtpnl/+/38477?usp=email ) Change subject: Bump version: 1.3.0.4-b968 → 1.3.1 ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/38477?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Change-Id: Iba3b7a3b4f519be39808d03617967bb7027c6735 Gerrit-Change-Number: 38477 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-CC: Jenkins Builder Gerrit-Attention: osmith <osmith(a)sysmocom.de> Gerrit-Comment-Date: Mon, 21 Oct 2024 11:33:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libgtpnl[master]: Bump version: 1.3.0.4-b968 → 1.3.1
by osmith 21 Oct '24

21 Oct '24
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libgtpnl/+/38477?usp=email ) Change subject: Bump version: 1.3.0.4-b968 → 1.3.1 ...................................................................... Bump version: 1.3.0.4-b968 → 1.3.1 Change-Id: Iba3b7a3b4f519be39808d03617967bb7027c6735 --- M debian/changelog M src/Makefile.am 2 files changed, 15 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/libgtpnl refs/changes/77/38477/1 diff --git a/debian/changelog b/debian/changelog index 9aba358..61e0d29 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +libgtpnl (1.3.1) unstable; urgency=medium + + [ Eric Wild ] + * fix clang build + + [ Jan Engelhardt ] + * Revert `configure: regular_C(PP)FLAGS -> C(PP)FLAGS` + * build: fix bashims in configure.ac + + [ Pau Espin Pedrol ] + * dev_create: Avoid passing IFLA_GTP_FD* attribute with value -1 + + -- Oliver Smith <osmith(a)sysmocom.de> Mon, 21 Oct 2024 13:31:29 +0200 + libgtpnl (1.3.0) unstable; urgency=medium [ Oliver Smith ] diff --git a/src/Makefile.am b/src/Makefile.am index fbc7579..57c87d5 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,7 +2,7 @@ # This is _NOT_ the library release version, it's an API version. # Please read Chapter 6 "Library interface versions" of the libtool documentation before making any modification -LIBVERSION=2:0:2 +LIBVERSION=2:1:2 lib_LTLIBRARIES = libgtpnl.la -- To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/38477?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Change-Id: Iba3b7a3b4f519be39808d03617967bb7027c6735 Gerrit-Change-Number: 38477 Gerrit-PatchSet: 1 Gerrit-Owner: osmith <osmith(a)sysmocom.de>
1 0
0 0
[XS] Change in libgtpnl[master]: dev_create: Avoid passing IFLA_GTP_FD* attribute with value -1
by pespin 21 Oct '24

21 Oct '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/libgtpnl/+/38460?usp=email ) Change subject: dev_create: Avoid passing IFLA_GTP_FD* attribute with value -1 ...................................................................... dev_create: Avoid passing IFLA_GTP_FD* attribute with value -1 The kernel will just reject with errno=9 and log message: "gtp: gtp socket fd=-1 not found". Instead, avoid adding the attribute in first place, which is what the kernel expects. Related: SYS#7126 Change-Id: Ib7e1d362fbb556c9b15b25408058fbf00bcc7aa3 --- M src/gtp-rtnl.c 1 file changed, 4 insertions(+), 2 deletions(-) Approvals: fixeria: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved laforge: Looks good to me, approved diff --git a/src/gtp-rtnl.c b/src/gtp-rtnl.c index 6baa5a6..e0db921 100644 --- a/src/gtp-rtnl.c +++ b/src/gtp-rtnl.c @@ -127,8 +127,10 @@ nest = mnl_attr_nest_start(nlh, IFLA_LINKINFO); mnl_attr_put_str(nlh, IFLA_INFO_KIND, "gtp"); nest2 = mnl_attr_nest_start(nlh, IFLA_INFO_DATA); - mnl_attr_put_u32(nlh, IFLA_GTP_FD0, fd0); - mnl_attr_put_u32(nlh, IFLA_GTP_FD1, fd1); + if (fd0 >= 0) + mnl_attr_put_u32(nlh, IFLA_GTP_FD0, fd0); + if (fd1 >= 0) + mnl_attr_put_u32(nlh, IFLA_GTP_FD1, fd1); mnl_attr_put_u32(nlh, IFLA_GTP_PDP_HASHSIZE, 131072); if (role != GTP_ROLE_GGSN) mnl_attr_put_u32(nlh, IFLA_GTP_ROLE, role); -- To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/38460?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Change-Id: Ib7e1d362fbb556c9b15b25408058fbf00bcc7aa3 Gerrit-Change-Number: 38460 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <axilirator(a)gmail.com> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pablo <pablo(a)gnumonks.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in libgtpnl[master]: dev_create: Avoid passing IFLA_GTP_FD* attribute with value -1
by pespin 21 Oct '24

21 Oct '24
Attention is currently required from: fixeria, pablo. pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/libgtpnl/+/38460?usp=email ) Change subject: dev_create: Avoid passing IFLA_GTP_FD* attribute with value -1 ...................................................................... Patch Set 1: Code-Review+2 (1 comment) Patchset: PS1: > this probably should be back-ported / patch-released? We can probably create a patch release 1.3.1 on top of current master. -- To view, visit https://gerrit.osmocom.org/c/libgtpnl/+/38460?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libgtpnl Gerrit-Branch: master Gerrit-Change-Id: Ib7e1d362fbb556c9b15b25408058fbf00bcc7aa3 Gerrit-Change-Number: 38460 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <axilirator(a)gmail.com> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: pablo <pablo(a)gnumonks.org> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pablo <pablo(a)gnumonks.org> Gerrit-Attention: fixeria <axilirator(a)gmail.com> Gerrit-Comment-Date: Mon, 21 Oct 2024 11:23:25 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: ggsn: Introduce test TC_pdp4(6)_act_deact_mtu
by pespin 21 Oct '24

21 Oct '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38469?usp=email ) Change subject: ggsn: Introduce test TC_pdp4(6)_act_deact_mtu ...................................................................... ggsn: Introduce test TC_pdp4(6)_act_deact_mtu This tests so far only test retrieval of MTU over PCO, which is only used for IPv4 APNs. When IPv6 is in used, it is expected to be retrieved over IPv6 SLAAC RA. Such tests will be done in a follow-up patch once the related procedure is implemented in osmo-ggsn. Related: OS#6298 Related: SYS#7122 Change-Id: I2ceb76a3a07b44f69937c9f5a040482320bca377 --- M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/expected-results.xml M ggsn_tests/gen_links.sh M library/GTPv1C_Templates.ttcn M library/PCO_Types.ttcn 5 files changed, 155 insertions(+), 6 deletions(-) Approvals: osmith: Looks good to me, but someone else must approve Jenkins Builder: Verified fixeria: Looks good to me, approved diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 8d091f9..5983703 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -26,6 +26,7 @@ import from GTPU_Types all; import from GTPv1C_Templates all; import from GTPv1U_Templates all; + import from PCO_Types all; import from IPCP_Types all; import from IPCP_Templates all; import from PAP_Types all; @@ -96,6 +97,12 @@ integer mp_t3_response := 5; /* local T3-RESPONSE timeout, seconds */ integer mp_n3_requests := 3; /* local N3-REQUESTS counter */ + /* MTU to configure and expect when testing related tests. + * This needs to match the value in configured file for open5gs + * since there's no support to configure it dynamically over VTY. + */ + uint16_t m_configured_mtu := 1400; + GGSN_Impl m_ggsn_impl := GGSN_IMPL_OSMOCOM; GGSN_Conf m_ggsn_conf := GGSN_CONF_ALL; } @@ -226,6 +233,31 @@ f_vty_transceive(GGSNVTY, "end"); } + /* -1 = osmo-ggsn default mtu */ + private function f_vty_set_mtu(integer mtu) runs on GT_CT { + var charstring mtu_cmd; + if (mtu >= 0) { + mtu_cmd := "mtu " & int2str(mtu); + } else { + mtu_cmd := "mtu default"; + } + + f_vty_enter_config(GGSNVTY); + f_vty_transceive(GGSNVTY, "ggsn ggsn0"); + + f_vty_transceive(GGSNVTY, "apn internet"); + f_vty_transceive(GGSNVTY, mtu_cmd); + f_vty_transceive(GGSNVTY, "exit"); + + f_vty_transceive(GGSNVTY, "apn inet6"); + f_vty_transceive(GGSNVTY, mtu_cmd); + f_vty_transceive(GGSNVTY, "exit"); + + f_vty_transceive(GGSNVTY, "apn inet46"); + f_vty_transceive(GGSNVTY, mtu_cmd); + f_vty_transceive(GGSNVTY, "end"); + } + private function DiameterForwardUnitdataCallback(PDU_DIAMETER msg) runs on DIAMETER_Emulation_CT return template PDU_DIAMETER { DIAMETER_UNIT.send(msg); @@ -1331,6 +1363,36 @@ f_shutdown_helper(); } + /* Test PDP context activation requesting MTU in PCO */ + testcase TC_pdp4_act_deact_mtu() runs on GT_CT { + f_init(); + if (m_ggsn_impl == GGSN_IMPL_OSMOCOM) { + f_vty_set_mtu(m_configured_mtu); + } else { + /* In GGSN_IMPL_OPEN5GS we expect open5gs-smfd to be + * configured with mtu value m_configured_mtu */ + } + + var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), "1234", c_ApnInternet, valueof(t_EuaIPv4Dyn))); + ctx.pco_req := valueof(ts_PCO_MTU); + f_pdp_ctx_act(ctx); + + f_PCO_ensure_no_duplicates(ctx.pco_neg); + /* verify PCO contains MTU */ + var octetstring rx_mtu_octstr := f_PCO_extract_proto(ctx.pco_neg, PCO_P_to_OCT2(PCO_P_IPv4_LINK_MTU), 1); + if (not match(rx_mtu_octstr, decmatch tr_PCO_P_UV_U16(m_configured_mtu))) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Rx Unexpected MTU ", rx_mtu_octstr, + " vs exp ", tr_PCO_P_UV_U16(m_configured_mtu))); + } + + f_pdp_ctx_del(ctx, '1'B); + if (m_ggsn_impl == GGSN_IMPL_OSMOCOM) { + f_vty_set_mtu(-1); + } + f_shutdown_helper(); + } + /* Test PDP context activation for dynamic IPv4 EUA. Test we can send ICMPv4 ping over GTPU to DNS server. */ testcase TC_pdp4_act_deact_gtpu_access() runs on GT_CT { @@ -1667,6 +1729,36 @@ f_shutdown_helper(); } + /* Test IPv4v6 context activation requesting MTU in PCO */ + testcase TC_pdp46_act_deact_mtu() runs on GT_CT { + f_init(); + if (m_ggsn_impl == GGSN_IMPL_OSMOCOM) { + f_vty_set_mtu(m_configured_mtu); + } else { + /* In GGSN_IMPL_OPEN5GS we expect open5gs-smfd to be + * configured with mtu value m_configured_mtu */ + } + + var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), "1234", c_ApnInet46, valueof(t_EuaIPv4Dynv6Dyn))); + ctx.pco_req := valueof(ts_PCO_MTU); + f_pdp_ctx_act(ctx); + + f_PCO_ensure_no_duplicates(ctx.pco_neg); + /* verify PCO contains MTU */ + var octetstring rx_mtu_octstr := f_PCO_extract_proto(ctx.pco_neg, PCO_P_to_OCT2(PCO_P_IPv4_LINK_MTU), 1); + if (not match(rx_mtu_octstr, decmatch tr_PCO_P_UV_U16(m_configured_mtu))) { + Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail, + log2str("Rx Unexpected MTU ", rx_mtu_octstr, + " vs exp ", tr_PCO_P_UV_U16(m_configured_mtu))); + } + + f_pdp_ctx_del(ctx, '1'B); + if (m_ggsn_impl == GGSN_IMPL_OSMOCOM) { + f_vty_set_mtu(-1); + } + f_shutdown_helper(); + } + /* Test PDP context activation for dynamic IPv4v6 EUA. Test we can send ICMPv6 ping over GTPU to DNS server. */ testcase TC_pdp46_act_deact_gtpu_access() runs on GT_CT { @@ -2279,6 +2371,7 @@ execute(TC_pdp4_act_deact_ipcp()); execute(TC_pdp4_act_deact_ipcp_pap_broken()); execute(TC_pdp4_act_deact_pcodns()); + execute(TC_pdp4_act_deact_mtu()); execute(TC_pdp4_act_deact_gtpu_access()); execute(TC_pdp4_act_deact_gtpu_access_wrong_saddr()); execute(TC_pdp4_act_deact_gtpu_access_ipv6_apn4()); @@ -2308,6 +2401,7 @@ execute(TC_pdp46_act_deact_icmp6()); execute(TC_pdp46_act_deact_pcodns4()); execute(TC_pdp46_act_deact_pcodns6()); + execute(TC_pdp46_act_deact_mtu()); execute(TC_pdp46_act_deact_gtpu_access()); execute(TC_pdp46_act_deact_gtpu_access_wrong_saddr_ipv4()); execute(TC_pdp46_act_deact_gtpu_access_wrong_ll_saddr_ipv6()); diff --git a/ggsn_tests/expected-results.xml b/ggsn_tests/expected-results.xml index baa5b1f..4e37ecd 100644 --- a/ggsn_tests/expected-results.xml +++ b/ggsn_tests/expected-results.xml @@ -4,6 +4,7 @@ <testcase classname='GGSN_Tests' name='TC_pdp4_act_deact_ipcp' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp4_act_deact_ipcp_pap_broken' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp4_act_deact_pcodns' time='MASKED'/> + <testcase classname='GGSN_Tests' name='TC_pdp4_act_deact_mtu' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp4_act_deact_gtpu_access' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp4_clients_interact_with_txseq' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp4_clients_interact_without_txseq' time='MASKED'/> @@ -19,6 +20,7 @@ <testcase classname='GGSN_Tests' name='TC_pdp46_act_deact_icmp6' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp46_act_deact_pcodns4' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp46_act_deact_pcodns6' time='MASKED'/> + <testcase classname='GGSN_Tests' name='TC_pdp46_act_deact_mtu' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp46_act_deact_gtpu_access' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp46_clients_interact' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp46_act_deact_apn4' time='MASKED'/> diff --git a/ggsn_tests/gen_links.sh b/ggsn_tests/gen_links.sh index 45c84bd..cd4c406 100755 --- a/ggsn_tests/gen_links.sh +++ b/ggsn_tests/gen_links.sh @@ -58,7 +58,7 @@ gen_links $DIR $FILES DIR=../library -FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc IPCP_Types.ttcn IPCP_Templates.ttcn PAP_Types.ttcn " +FILES="Misc_Helpers.ttcn General_Types.ttcn GSM_Types.ttcn Osmocom_Types.ttcn Native_Functions.ttcn Native_FunctionDefs.cc PCO_Types.ttcn IPCP_Types.ttcn IPCP_Templates.ttcn PAP_Types.ttcn " FILES+="GTPv1C_CodecPort.ttcn GTPv1C_CodecPort_CtrlFunct.ttcn GTPv1C_CodecPort_CtrlFunctDef.cc GTPv1C_Templates.ttcn Osmocom_Gb_Types.ttcn " FILES+="GTPv1U_CodecPort.ttcn GTPv1U_CodecPort_CtrlFunct.ttcn GTPv1U_CodecPort_CtrlFunctDef.cc GTPv1U_Templates.ttcn " FILES+="DIAMETER_Types.ttcn DIAMETER_CodecPort.ttcn DIAMETER_CodecPort_CtrlFunct.ttcn DIAMETER_CodecPort_CtrlFunctDef.cc DIAMETER_Emulation.ttcn " diff --git a/library/GTPv1C_Templates.ttcn b/library/GTPv1C_Templates.ttcn index 9f963f3..766870a 100644 --- a/library/GTPv1C_Templates.ttcn +++ b/library/GTPv1C_Templates.ttcn @@ -1291,6 +1291,10 @@ protocols := superset(tr_PCO_Proto('000d'O, 4, contents)) } +template (value) ProtConfigOptions ts_PCO_MTU modifies ts_PCO := { + protocols := { ts_PCO_Proto('0010'O) } +} + /* extract a given protocol payload from PCO */ function f_PCO_extract_proto(ProtConfigOptions pco, OCT2 protocol, integer nth_match := 1) return octetstring { var integer i; diff --git a/library/PCO_Types.ttcn b/library/PCO_Types.ttcn index 04b5080..4fea861 100644 --- a/library/PCO_Types.ttcn +++ b/library/PCO_Types.ttcn @@ -52,13 +52,24 @@ return int2oct(enum2int(p), 2); } -type set of ProtocolElement ProtocolIDList; +type record ProtocolElementU16 { + uint16_t val +}; + +type union ProtocolElementPayloadUnion { + ProtocolElementU16 u16, + octetstring octstr +}; type record ProtocolElement { PCO_P protocolID, uint8_t lengthProtoID, - octetstring protoIDContents -} with { variant (lengthProtoID) "LENGTHTO(protoIDContents)" }; + ProtocolElementPayloadUnion u +} with { variant (lengthProtoID) "LENGTHTO(u)" + variant (u) "CROSSTAG(u16, protocolID = PCO_P_IPv4_LINK_MTU; + octstr, OTHERWISE)" + }; +type set of ProtocolElement ProtocolIDList; type record PCO_DATA { BIT1 extension0, @@ -77,13 +88,46 @@ * PCO_Templates: **********************/ +/* Union value (payload) templates */ +template (value) ProtocolElementU16 ts_PCO_P_UV_U16(template (value) uint16_t val) +:= { val := val } +template (present) ProtocolElementU16 tr_PCO_P_UV_U16(template (present) uint16_t val := ?) +:= { val := val } + +/* Union templates */ +template (value) ProtocolElementPayloadUnion ts_PCO_P_U_U16(template (value) uint16_t val) +:= { u16 := ts_PCO_P_UV_U16(val) } +template (present) ProtocolElementPayloadUnion tr_PCO_P_U_U16(template (present) uint16_t val := ?) +:= { u16 := tr_PCO_P_UV_U16(val) } + +template (value) ProtocolElementPayloadUnion ts_PCO_P_U_OCTSTR(template (value) octetstring protoIDContents := ''O) +:= { octstr := protoIDContents } +template (present) ProtocolElementPayloadUnion tr_PCO_P_U_OCTSTR(template (present) octetstring protoIDContents := ?) +:= { octstr := protoIDContents } + +/* PCOElement templates */ +template (value) ProtocolElement ts_PCO_P_U16(template (value) PCO_P protocolID, + template (value) uint16_t val) +:= { + protocolID := protocolID, + lengthProtoID := 2, + u := ts_PCO_P_U_U16(val) +} +template (present) ProtocolElement tr_PCO_P_U16(template (present) PCO_P protocolID := ?, + template (present) uint16_t val := ?) +:= { + protocolID := protocolID, + lengthProtoID := 2, + u := tr_PCO_P_U_U16(val) +} + template (value) ProtocolElement ts_PCO_P_OCTSTR(template (value) PCO_P protocolID, template (value) uint8_t lengthProtoID := 0, template (value) octetstring protoIDContents := ''O) := { protocolID := protocolID, lengthProtoID := lengthProtoID, - protoIDContents := protoIDContents + u := ts_PCO_P_U_OCTSTR(protoIDContents) } template (present) ProtocolElement tr_PCO_P_OCTSTR(template (present) PCO_P protocolID := ?, @@ -92,10 +136,15 @@ := { protocolID := protocolID, lengthProtoID := lengthProtoID, - protoIDContents := protoIDContents + u := tr_PCO_P_U_OCTSTR(protoIDContents) } +template (value) ProtocolElement ts_PCO_P_IPv4_LINK_MTU(template (value) uint16_t mtu) := + ts_PCO_P_U16(PCO_P_IPv4_LINK_MTU, mtu); +template (present) ProtocolElement tr_PCO_P_IPv4_LINK_MTU(template (present) uint16_t mtu := ?) := + tr_PCO_P_U16(PCO_P_IPv4_LINK_MTU, mtu); + template (value) ProtocolElement ts_PCO_P_DNS_IPv4(template (value) octetstring dns4 := ''O) := ts_PCO_P_OCTSTR(PCO_P_DNS_IPv4_ADDR, protoIDContents := dns4); template (present) ProtocolElement tr_PCO_P_DNS_IPv4(template (present) octetstring dns4 := ?) := -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38469?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: I2ceb76a3a07b44f69937c9f5a040482320bca377 Gerrit-Change-Number: 38469 Gerrit-PatchSet: 5 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>
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: ggsn: Validate MTU sent during ICMPv6 RA
by pespin 21 Oct '24

21 Oct '24
pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38475?usp=email ) Change subject: ggsn: Validate MTU sent during ICMPv6 RA ...................................................................... ggsn: Validate MTU sent during ICMPv6 RA Related: OS#6298 Related: SYS#7122 Change-Id: Ia5bbc5f9e42b02d1b9bd6c4190a2bd439663deeb --- M ggsn_tests/GGSN_Tests.ttcn M ggsn_tests/expected-results.xml M library/ICMPv6_Templates.ttcn 3 files changed, 49 insertions(+), 9 deletions(-) Approvals: fixeria: Looks good to me, approved Jenkins Builder: Verified osmith: Looks good to me, but someone else must approve diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 5983703..8b1a6e7 100644 --- a/ggsn_tests/GGSN_Tests.ttcn +++ b/ggsn_tests/GGSN_Tests.ttcn @@ -957,9 +957,14 @@ repeat; } /* We are waiting for RA, update ctx */ - if (match(icmp6, tr_ICMPv6_RA(?, 64))) { - ctx.ip6_prefix := icmp6.routerAdvertisement.options[0].prefixInformation.prefix; - log("RA with /64 prefix ", ctx.ip6_prefix); + if (match(icmp6, tr_ICMPv6_RA(?))) { + for (var integer i := 0; i < lengthof(icmp6.routerAdvertisement.options); i := i + 1) { + var OptionField opt := icmp6.routerAdvertisement.options[i]; + if (ischosen(opt.prefixInformation)) { + ctx.ip6_prefix := opt.prefixInformation.prefix; + log("RA with /64 prefix ", ctx.ip6_prefix); + } + } } } [] GTPU.receive(tr_GTPU_GPDU(?, ?)) { repeat; } @@ -976,8 +981,15 @@ } /* wait for GGSN to send us an ICMPv6 router advertisement */ - function f_wait_rtr_adv(PdpContext ctx) runs on GT_CT { - f_wait_icmp6(ctx, tr_ICMPv6_RA(?, 64)); + function f_wait_rtr_adv(PdpContext ctx, template integer mtu := *) runs on GT_CT { + var template (present) OptionField opt_prefix := tr_ICMP6_OptPrefix(?, 64); + var template (present) Options opts; + if (istemplatekind(mtu, "*")) { + opts := ( { opt_prefix }, { opt_prefix, tr_ICMP6_OptMTU(?) } ); + } else { + opts := { opt_prefix, tr_ICMP6_OptMTU(mtu) }; + } + f_wait_icmp6(ctx, tr_ICMPv6_RA(opts)); } /* Wait for ICMPv6 echo request from GTP */ @@ -1094,6 +1106,30 @@ f_shutdown_helper(); } + /* Test PDP context activation for dynamic IPv6 EUA with MTU in router solicitation/advertisement */ + testcase TC_pdp6_act_deact_mtu() runs on GT_CT { + f_init(); + if (m_ggsn_impl == GGSN_IMPL_OSMOCOM) { + f_vty_set_mtu(m_configured_mtu); + } else { + /* In GGSN_IMPL_OPEN5GS we expect open5gs-smfd to be + * configured with mtu value m_configured_mtu */ + } + + var PdpContext ctx := valueof(t_DefinePDP(f_rnd_imsi('26242'H), "1234", c_ApnInet6, valueof(t_EuaIPv6Dyn))); + f_pdp_ctx_act(ctx); + + f_send_gtpu(ctx, f_icmpv6_rs_for_pdp(ctx)); + f_wait_rtr_adv(ctx, m_configured_mtu); + f_send_gtpu(ctx, f_gen_icmpv6_neigh_solicit_for_pdp(ctx)); + + f_pdp_ctx_del(ctx, '1'B); + if (m_ggsn_impl == GGSN_IMPL_OSMOCOM) { + f_vty_set_mtu(-1); + } + f_shutdown_helper(); + } + /* Test PDP context activation for dynamic IPv6 EUA with IPv6 DNS in PCO and router solicitation/advertisement. Test we can send ICMPv6 ping over GTPU to DNS server. */ testcase TC_pdp6_act_deact_gtpu_access() runs on GT_CT { @@ -1752,6 +1788,10 @@ " vs exp ", tr_PCO_P_UV_U16(m_configured_mtu))); } + f_send_gtpu(ctx, f_icmpv6_rs_for_pdp(ctx)); + f_wait_rtr_adv(ctx, m_configured_mtu); + f_send_gtpu(ctx, f_gen_icmpv6_neigh_solicit_for_pdp(ctx)); + f_pdp_ctx_del(ctx, '1'B); if (m_ggsn_impl == GGSN_IMPL_OSMOCOM) { f_vty_set_mtu(-1); @@ -2387,6 +2427,7 @@ execute(TC_pdp6_act_deact()); execute(TC_pdp6_act_deact_pcodns()); execute(TC_pdp6_act_deact_icmp6()); + execute(TC_pdp6_act_deact_mtu()); execute(TC_pdp6_act_deact_gtpu_access()); execute(TC_pdp6_act_deact_gtpu_access_ll_saddr()); execute(TC_pdp6_act_deact_gtpu_access_wrong_ll_saddr()); diff --git a/ggsn_tests/expected-results.xml b/ggsn_tests/expected-results.xml index 4e37ecd..1b072ad 100644 --- a/ggsn_tests/expected-results.xml +++ b/ggsn_tests/expected-results.xml @@ -13,6 +13,7 @@ <testcase classname='GGSN_Tests' name='TC_pdp6_act_deact' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp6_act_deact_pcodns' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp6_act_deact_icmp6' time='MASKED'/> + <testcase classname='GGSN_Tests' name='TC_pdp6_act_deact_mtu' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp6_act_deact_gtpu_access' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp6_clients_interact' time='MASKED'/> <testcase classname='GGSN_Tests' name='TC_pdp46_act_deact' time='MASKED'/> diff --git a/library/ICMPv6_Templates.ttcn b/library/ICMPv6_Templates.ttcn index 687aad4..a77fb62 100644 --- a/library/ICMPv6_Templates.ttcn +++ b/library/ICMPv6_Templates.ttcn @@ -114,7 +114,7 @@ } /* template for receiving/matching an ICMPv6 router advertisement */ - template (present) PDU_ICMPv6 tr_ICMPv6_RA(template (present) OCT16 prefix, template (present) INT1 prefix_len) := { + template (present) PDU_ICMPv6 tr_ICMPv6_RA(template (present) Options options := ?) := { routerAdvertisement := { typeField := 134, code := 0, @@ -126,9 +126,7 @@ routerLifetime := ?, reachableTime := ?, retransTimer := ?, - options := ({ tr_ICMP6_OptPrefix(prefix, prefix_len) }, - { tr_ICMP6_OptPrefix(prefix, prefix_len), tr_ICMP6_OptMTU } - ) + options := options } } -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38475?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: Ia5bbc5f9e42b02d1b9bd6c4190a2bd439663deeb Gerrit-Change-Number: 38475 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>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • ...
  • 164
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.