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-ttcn3-hacks[master]: library: Move IPCP templates GTPv1C_Templates.ttcn -> IPCP_Templates....
by fixeria 18 Oct '24

18 Oct '24
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38464?usp=email ) Change subject: library: Move IPCP templates GTPv1C_Templates.ttcn -> IPCP_Templates.ttcn ...................................................................... Patch Set 3: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38464?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: I233292ea886e1b69a2f9aa1a159c816791b47136 Gerrit-Change-Number: 38464 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Oct 2024 18:23:23 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in osmo-ggsn[master]: WIP: ggsn: Support announcing APN MTU over ICMPv6 RA
by pespin 18 Oct '24

18 Oct '24
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38470?usp=email ) Change subject: WIP: ggsn: Support announcing APN MTU over ICMPv6 RA ...................................................................... WIP: ggsn: Support announcing APN MTU over ICMPv6 RA Related: OS#6298 Related: SYS#7122 Change-Id: I8bb67915dd5f39ad9ffb80e5aaf9af1e7d70c96c --- M ggsn/ggsn.c M lib/icmpv6.c M lib/icmpv6.h 3 files changed, 33 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/70/38470/1 diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c index 4dc0c94..19b0132 100644 --- a/ggsn/ggsn.c +++ b/ggsn/ggsn.c @@ -774,7 +774,7 @@ /* daddr: all-routers multicast addr */ if (IN6_ARE_ADDR_EQUAL(&ip6h->ip6_dst, &all_router_mcast_addr)) return handle_router_mcast(pdp->gsn, pdp, &peer->addr.v6, - &apn->v6_lladdr, pack, len); + &apn->v6_lladdr, apn->cfg.mtu, pack, len); break; case 4: peer = pdp_get_peer_ipv(pdp, false); diff --git a/lib/icmpv6.c b/lib/icmpv6.c index b6994cd..e74fb70 100644 --- a/lib/icmpv6.c +++ b/lib/icmpv6.c @@ -94,11 +94,13 @@ * \returns callee-allocated message buffer containing router advertisement */ static struct msgb *icmpv6_construct_ra(const struct in6_addr *saddr, const struct in6_addr *daddr, - const struct in6_addr *prefix) + const struct in6_addr *prefix, + uint32_t mtu) { struct msgb *msg = msgb_alloc_headroom(512,128, "IPv6 RA"); struct icmpv6_radv_hdr *ra; struct icmpv6_opt_prefix *ra_opt_pref; + struct icmpv6_opt_mtu *ra_opt_mtu; OSMO_ASSERT(msg); @@ -135,6 +137,25 @@ ra_opt_pref->res2 = 0; memcpy(ra_opt_pref->prefix, prefix, sizeof(ra_opt_pref->prefix)); + /* RFC4861 Section 4.6.4, MTU */ + ra_opt_mtu = (struct icmpv6_opt_mtu *) msgb_put(msg, sizeof(*ra_opt_mtu)); + ra_opt_mtu->hdr.type = 5; /* RFC4861 4.6.4 */ + ra_opt_mtu->hdr.len = 1; /* RFC4861 4.6.4 */ + ra_opt_mtu->reserved = 0; + ra_opt_mtu->mtu = htonl(mtu); + + /* The Prefix is contained in the Prefix Information Option of + * the Router Advertisements and shall have the A-flag set + * and the L-flag cleared */ + ra_opt_pref->a = 1; + ra_opt_pref->l = 0; + ra_opt_pref->res = 0; + /* The lifetime of the prefix shall be set to infinity */ + ra_opt_pref->valid_lifetime = htonl(GGSN_AdvValidLifetime); + ra_opt_pref->preferred_lifetime = htonl(GGSN_AdvPreferredLifetime); + ra_opt_pref->res2 = 0; + memcpy(ra_opt_pref->prefix, prefix, sizeof(ra_opt_pref->prefix)); + /* checksum */ ra->hdr.csum = icmpv6_prepend_ip6hdr(msg, saddr, daddr); @@ -194,6 +215,7 @@ int handle_router_mcast(struct gsn_t *gsn, struct pdp_t *pdp, const struct in6_addr *pdp_prefix, const struct in6_addr *own_ll_addr, + uint32_t mtu, const uint8_t *pack, unsigned len) { const struct ip6_hdr *ip6h = (struct ip6_hdr *)pack; @@ -230,7 +252,7 @@ /* Send router advertisement from GGSN link-local * address to MS link-local address, including prefix * allocated to this PDP context */ - msg = icmpv6_construct_ra(own_ll_addr, &ip6h->ip6_src, pdp_prefix); + msg = icmpv6_construct_ra(own_ll_addr, &ip6h->ip6_src, pdp_prefix, mtu); /* Send the constructed RA to the MS */ gtp_data_req(gsn, pdp, msgb_data(msg), msgb_length(msg)); msgb_free(msg); diff --git a/lib/icmpv6.h b/lib/icmpv6.h index 5bed5c6..1040600 100644 --- a/lib/icmpv6.h +++ b/lib/icmpv6.h @@ -81,6 +81,13 @@ uint8_t prefix[16]; } __attribute__ ((packed)); +/* RFC4861 Section 4.6.4 */ +struct icmpv6_opt_mtu { + struct icmpv6_opt_hdr hdr; + uint16_t reserved; + uint32_t mtu; +} __attribute__ ((packed)); + uint16_t icmpv6_prepend_ip6hdr(struct msgb *msg, const struct in6_addr *saddr, const struct in6_addr *daddr); @@ -89,6 +96,7 @@ int handle_router_mcast(struct gsn_t *gsn, struct pdp_t *pdp, const struct in6_addr *pdp_prefix, const struct in6_addr *own_ll_addr, + uint32_t mtu, const uint8_t *pack, unsigned len); struct icmpv6_radv_hdr *icmpv6_validate_router_adv(const uint8_t *pack, unsigned len); -- To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38470?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-ggsn Gerrit-Branch: master Gerrit-Change-Id: I8bb67915dd5f39ad9ffb80e5aaf9af1e7d70c96c Gerrit-Change-Number: 38470 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: s1gw: Remove unneeded dep IPCP_Types.ttcn
by fixeria 18 Oct '24

18 Oct '24
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38466?usp=email ) Change subject: s1gw: Remove unneeded dep IPCP_Types.ttcn ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38466?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: Iad81c8d76efa2618ca7e354d2b73617a54a8d5ee Gerrit-Change-Number: 38466 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Oct 2024 18:22:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in osmo-ttcn3-hacks[master]: mgw: Remove unneeded dep IPCP_Types.ttcn
by fixeria 18 Oct '24

18 Oct '24
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38465?usp=email ) Change subject: mgw: Remove unneeded dep IPCP_Types.ttcn ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38465?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: I318f4ba78adf778820e8d65d5932e454bc5da670 Gerrit-Change-Number: 38465 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Oct 2024 18:22:42 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: library/GTPv1C_Templates: Clean up PCO templates
by fixeria 18 Oct '24

18 Oct '24
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38463?usp=email ) Change subject: library/GTPv1C_Templates: Clean up PCO templates ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38463?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: I005a6dea0606bcb677260f85b24396b55a150153 Gerrit-Change-Number: 38463 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Oct 2024 18:22:32 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XL] Change in osmo-ttcn3-hacks[master]: cosmetic: library/GTPv1C_Templates: remove extra indentation level
by fixeria 18 Oct '24

18 Oct '24
Attention is currently required from: pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38462?usp=email ) Change subject: cosmetic: library/GTPv1C_Templates: remove extra indentation level ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38462?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: I87755ec0a9023e79fb5f7a40c6c1734dca44696b Gerrit-Change-Number: 38462 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Oct 2024 18:21:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[L] Change in osmo-ttcn3-hacks[master]: library/GTPv1C_Templates: Lots of improvements in template declarations
by fixeria 18 Oct '24

18 Oct '24
Attention is currently required from: laforge, osmith, pespin. fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38461?usp=email ) Change subject: library/GTPv1C_Templates: Lots of improvements in template declarations ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38461?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: I38a4b1c5874fda173a7b89122c84cb83ac71a036 Gerrit-Change-Number: 38461 Gerrit-PatchSet: 2 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: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 18 Oct 2024 18:19:31 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: ggsn: Introduce test TC_pdp4(6)_act_deact_mtu
by pespin 18 Oct '24

18 Oct '24
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38469?usp=email to look at the new patch set (#3). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder 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/gen_links.sh M library/GTPv1C_Templates.ttcn M library/PCO_Types.ttcn 4 files changed, 140 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/69/38469/3 -- 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: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I2ceb76a3a07b44f69937c9f5a040482320bca377 Gerrit-Change-Number: 38469 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: ggsn: Introduce test TC_pdp4(6)_act_deact_mtu
by pespin 18 Oct '24

18 Oct '24
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38469?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: 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/gen_links.sh M library/GTPv1C_Templates.ttcn M library/PCO_Types.ttcn 4 files changed, 135 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/69/38469/2 -- 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: newpatchset Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I2ceb76a3a07b44f69937c9f5a040482320bca377 Gerrit-Change-Number: 38469 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder
1 0
0 0
[M] Change in osmo-ttcn3-hacks[master]: ggsn: Introduce test TC_pdp4(6)_act_deact_mtu
by pespin 18 Oct '24

18 Oct '24
pespin has uploaded this change for review. ( 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/gen_links.sh M library/GTPv1C_Templates.ttcn M library/PCO_Types.ttcn 4 files changed, 120 insertions(+), 6 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/69/38469/1 diff --git a/ggsn_tests/GGSN_Tests.ttcn b/ggsn_tests/GGSN_Tests.ttcn index 8d091f9..54ecd73 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,29 @@ f_shutdown_helper(); } + /* Test PDP context activation requesting MTU in PCO */ + testcase TC_pdp4_act_deact_mtu() runs on GT_CT { + f_init(); + f_vty_set_mtu(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); + 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 +1722,29 @@ f_shutdown_helper(); } + /* Test IPv4v6 context activation requesting MTU in PCO */ + testcase TC_pdp46_act_deact_mtu() runs on GT_CT { + f_init(); + f_vty_set_mtu(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); + 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 +2357,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 +2387,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/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..98240fb 100644 --- a/library/GTPv1C_Templates.ttcn +++ b/library/GTPv1C_Templates.ttcn @@ -1226,6 +1226,7 @@ protocols := {} } + template (value) ProtConfigOptions ts_PCO_IPv6_DNS modifies ts_PCO := { protocols := { ts_PCO_Proto('0003'O) } } @@ -1291,6 +1292,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..d5ab012 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,31 @@ * 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_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,7 +121,7 @@ := { protocolID := protocolID, lengthProtoID := lengthProtoID, - protoIDContents := protoIDContents + u := tr_PCO_P_U_OCTSTR(protoIDContents) } -- 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: newchange Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: I2ceb76a3a07b44f69937c9f5a040482320bca377 Gerrit-Change-Number: 38469 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • ...
  • 164
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.