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

December 2022

  • 1 participants
  • 1979 discussions
Change in osmo-msc[master]: libmsc: check return value of gsm0808_create_ass2()
by pespin 14 Dec '22

14 Dec '22
Attention is currently required from: neels, fixeria. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/30582 ) Change subject: libmsc: check return value of gsm0808_create_ass2() ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/30582 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I6fd1669f2919034599d99336cf56f25a97afdf7c Gerrit-Change-Number: 30582 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Wed, 14 Dec 2022 11:50:36 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bts[master]: pcuif_proto: use define constant to specify nax number of trx
by dexter 14 Dec '22

14 Dec '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/30587 ) Change subject: pcuif_proto: use define constant to specify nax number of trx ...................................................................... pcuif_proto: use define constant to specify nax number of trx The array of trx in gsm_pcu_if_info_ind can hold trx 8 items. Lets use a define constant to specify the size of that array. Change-Id: I5fdd5b9e59865fabd0340650ecb347d52208ebe9 --- M include/osmo-bts/pcuif_proto.h 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/87/30587/1 diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index a5f03e3..0fece48 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -59,6 +59,7 @@ #define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */ #define PCU_IF_NUM_NSVC 2 +#define PCU_IF_NUM_TRX 8 enum gsm_pcu_if_text_type { PCU_VERSION, @@ -142,7 +143,7 @@ struct gsm_pcu_if_info_ind { uint32_t version; uint32_t flags; - struct gsm_pcu_if_info_trx trx[8]; /* TRX infos per BTS */ + struct gsm_pcu_if_info_trx trx[PCU_IF_NUM_TRX]; /* TRX infos per BTS */ uint8_t bsic; /* RAI */ uint16_t mcc, mnc; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30587 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I5fdd5b9e59865fabd0340650ecb347d52208ebe9 Gerrit-Change-Number: 30587 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: pcuif_proto: use define constant to specify nax number of trx
by dexter 14 Dec '22

14 Dec '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30586 ) Change subject: pcuif_proto: use define constant to specify nax number of trx ...................................................................... pcuif_proto: use define constant to specify nax number of trx The array of trx in gsm_pcu_if_info_ind can hold trx 8 items. Lets use a define constant to specify the size of that array. Change-Id: I25a9233e7be2d7cda8eb45a4cb9dddd3511d03c9 --- M include/osmocom/bsc/pcuif_proto.h 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/86/30586/1 diff --git a/include/osmocom/bsc/pcuif_proto.h b/include/osmocom/bsc/pcuif_proto.h index 5084cb8..fef0f88 100644 --- a/include/osmocom/bsc/pcuif_proto.h +++ b/include/osmocom/bsc/pcuif_proto.h @@ -63,6 +63,7 @@ #define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */ #define PCU_IF_NUM_NSVC 2 +#define PCU_IF_NUM_TRX 8 enum gsm_pcu_if_text_type { PCU_VERSION, @@ -146,7 +147,7 @@ struct gsm_pcu_if_info_ind { uint32_t version; uint32_t flags; - struct gsm_pcu_if_info_trx trx[8]; /* TRX infos per BTS */ + struct gsm_pcu_if_info_trx trx[PCU_IF_NUM_TRX]; /* TRX infos per BTS */ uint8_t bsic; /* RAI */ uint16_t mcc, mnc; -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30586 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I25a9233e7be2d7cda8eb45a4cb9dddd3511d03c9 Gerrit-Change-Number: 30586 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-pcu[master]: pcuif_proto: use define constant to specify nax number of trx
by dexter 14 Dec '22

14 Dec '22
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30585 ) Change subject: pcuif_proto: use define constant to specify nax number of trx ...................................................................... pcuif_proto: use define constant to specify nax number of trx The array of trx in gsm_pcu_if_info_ind can hold trx 8 items. Lets use a define constant to specify the size of that array. Change-Id: I2b12fd562ff867188a37e701bba1ad5de904f9bd --- M include/osmocom/pcu/pcuif_proto.h 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/85/30585/1 diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h index 5084cb8..fef0f88 100644 --- a/include/osmocom/pcu/pcuif_proto.h +++ b/include/osmocom/pcu/pcuif_proto.h @@ -63,6 +63,7 @@ #define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */ #define PCU_IF_NUM_NSVC 2 +#define PCU_IF_NUM_TRX 8 enum gsm_pcu_if_text_type { PCU_VERSION, @@ -146,7 +147,7 @@ struct gsm_pcu_if_info_ind { uint32_t version; uint32_t flags; - struct gsm_pcu_if_info_trx trx[8]; /* TRX infos per BTS */ + struct gsm_pcu_if_info_trx trx[PCU_IF_NUM_TRX]; /* TRX infos per BTS */ uint8_t bsic; /* RAI */ uint16_t mcc, mnc; -- To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30585 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-pcu Gerrit-Branch: master Gerrit-Change-Id: I2b12fd562ff867188a37e701bba1ad5de904f9bd Gerrit-Change-Number: 30585 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in libosmo-abis[master]: ipaccess: Clean up keepalive FSM properly
by daniel 14 Dec '22

14 Dec '22
daniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-abis/+/30584 ) Change subject: ipaccess: Clean up keepalive FSM properly ...................................................................... ipaccess: Clean up keepalive FSM properly Fixes: OS#5828 Change-Id: I0a54c1056e43161edc86c570e80be51d7517f411 --- M src/input/ipaccess.c 1 file changed, 7 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-abis refs/changes/84/30584/1 diff --git a/src/input/ipaccess.c b/src/input/ipaccess.c index bde2c12..44c1b78 100644 --- a/src/input/ipaccess.c +++ b/src/input/ipaccess.c @@ -51,6 +51,7 @@ #include <osmocom/core/backtrace.h> #include <osmocom/gsm/ipa.h> #include <osmocom/core/stats_tcp.h> +#include <osmocom/core/fsm.h> /* global parameters of IPA input driver */ struct ipa_pars g_e1inp_ipaccess_pars; @@ -77,7 +78,7 @@ ka_fsm = e1i_ts->driver.ipaccess.ka_fsm; if (ka_fsm) { - ipa_keepalive_fsm_stop(ka_fsm); + osmo_fsm_inst_term(ka_fsm, OSMO_FSM_TERM_REQUEST, NULL); e1i_ts->driver.ipaccess.ka_fsm = NULL; } } @@ -863,9 +864,10 @@ static void ipaccess_bts_updown_cb(struct ipa_client_conn *link, int up) { struct e1inp_line *line = link->line; + struct e1inp_ts *e1i_ts = ipaccess_line_ts(link->ofd, line); if (up) { - struct osmo_fsm_inst *ka_fsm = ipaccess_line_ts(link->ofd, line)->driver.ipaccess.ka_fsm; + struct osmo_fsm_inst *ka_fsm = e1i_ts->driver.ipaccess.ka_fsm; update_fd_settings(line, link->ofd->fd); if (ka_fsm && line->ipa_kap) @@ -873,6 +875,7 @@ return; } + ipaccess_keepalive_fsm_cleanup(e1i_ts); if (line->ops->sign_link_down) line->ops->sign_link_down(line); } @@ -1090,7 +1093,7 @@ } case E1INP_LINE_R_BTS: { struct ipa_client_conn *link; - struct e1inp_ts *e1i_ts; + struct e1inp_ts *e1i_ts = e1inp_line_ipa_oml_ts(line); LOGP(DLINP, LOGL_NOTICE, "enabling ipaccess BTS mode, " "OML connecting to %s:%u\n", line->ops->cfg.ipa.addr, @@ -1099,6 +1102,7 @@ /* Drop previous line */ if (il->ipa_cli[0]) { ipa_client_conn_close(il->ipa_cli[0]); + ipaccess_keepalive_fsm_cleanup(e1i_ts); ipa_client_conn_destroy(il->ipa_cli[0]); il->ipa_cli[0] = NULL; } @@ -1128,7 +1132,6 @@ return -EIO; } - e1i_ts = e1inp_line_ipa_oml_ts(line); ipaccess_bts_keepalive_fsm_alloc(e1i_ts, link, "oml_bts_to_bsc"); il->ipa_cli[0] = link; ret = 0; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/30584 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I0a54c1056e43161edc86c570e80be51d7517f411 Gerrit-Change-Number: 30584 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-bsc[master]: fix Speech Codec cfg in BSSMAP Assignment Complete
by fixeria 13 Dec '22

13 Dec '22
Attention is currently required from: neels. fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30583 ) Change subject: fix Speech Codec cfg in BSSMAP Assignment Complete ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30583 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3bf8f5ea9ae2a3c12fc5b483818d550a069fe66e Gerrit-Change-Number: 30583 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de> Gerrit-Comment-Date: Tue, 13 Dec 2022 23:52:41 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-upf[master]: nft: append 'accept' to each rule
by neels 13 Dec '22

13 Dec '22
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30501 ) Change subject: nft: append 'accept' to each rule ...................................................................... nft: append 'accept' to each rule This 'accept' is not an optional addition, it should always be present. (Just saying because previous patch added a VTY command to configure additions to the rules, and this patch is orthogonal to that.) Related: OS#5810 Change-Id: I129133cc5d7180ce3761d5604d602d23a5ef9825 --- M src/osmo-upf/upf_nft.c M tests/nft-rule.vty 2 files changed, 11 insertions(+), 10 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/src/osmo-upf/upf_nft.c b/src/osmo-upf/upf_nft.c index ed3e869..d1a83ff 100644 --- a/src/osmo-upf/upf_nft.c +++ b/src/osmo-upf/upf_nft.c @@ -162,6 +162,7 @@ OSMO_STRBUF_PRINTF(sb, " %s", i->str); } + OSMO_STRBUF_PRINTF(sb, " accept"); OSMO_STRBUF_PRINTF(sb, ";\n"); return sb.chars_needed; diff --git a/tests/nft-rule.vty b/tests/nft-rule.vty index 7e8952b..c52ef0e 100644 --- a/tests/nft-rule.vty +++ b/tests/nft-rule.vty @@ -6,16 +6,16 @@ no nft-rule tunmap append OsmoUPF(config-tunmap)# show nft-rule tunmap example add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter; -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter accept; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter accept; OsmoUPF(config-tunmap)# nft-rule tunmap append meta nftrace set 1 OsmoUPF(config-tunmap)# show nft-rule tunmap append nft-rule tunmap append meta nftrace set 1 OsmoUPF(config-tunmap)# show nft-rule tunmap example add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter meta nftrace set 1; -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter meta nftrace set 1; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter meta nftrace set 1 accept; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter meta nftrace set 1 accept; OsmoUPF(config-tunmap)# nft-rule tunmap append foo OsmoUPF(config-tunmap)# show nft-rule tunmap append @@ -23,8 +23,8 @@ nft-rule tunmap append foo OsmoUPF(config-tunmap)# show nft-rule tunmap example add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter meta nftrace set 1 foo; -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter meta nftrace set 1 foo; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter meta nftrace set 1 foo accept; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter meta nftrace set 1 foo accept; OsmoUPF(config-tunmap)# nft-rule tunmap append bar OsmoUPF(config-tunmap)# show nft-rule tunmap append @@ -33,8 +33,8 @@ nft-rule tunmap append bar OsmoUPF(config-tunmap)# show nft-rule tunmap example add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter meta nftrace set 1 foo bar; -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter meta nftrace set 1 foo bar; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter meta nftrace set 1 foo bar accept; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter meta nftrace set 1 foo bar accept; OsmoUPF(config-tunmap)# show running-config ... @@ -50,5 +50,5 @@ no nft-rule tunmap append OsmoUPF(config-tunmap)# show nft-rule tunmap example add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter; -add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter accept; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter accept; null-- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30501 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: I129133cc5d7180ce3761d5604d602d23a5ef9825 Gerrit-Change-Number: 30501 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-upf[master]: add cfg: tunmap / nft-rule append
by neels 13 Dec '22

13 Dec '22
neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30500 ) Change subject: add cfg: tunmap / nft-rule append ...................................................................... add cfg: tunmap / nft-rule append It can be useful to add 'meta nftrace set 1' to nftables rules to help analysis / site debugging. Add the possibility to do this by cfg. Instead of adding the fixed string of 'meta nftrace set 1', allow appending arbitrary strings to the nftables rules, to accomodate any other future tweaks that may be useful. Related: SYS#6192 Change-Id: Ia1fac67108902a48b43d8d1dc184ccf541fd9ba8 --- M include/osmocom/upf/upf.h M include/osmocom/upf/upf_nft.h M src/osmo-upf/up_gtp_action.c M src/osmo-upf/upf.c M src/osmo-upf/upf_nft.c M src/osmo-upf/upf_vty.c M tests/nft-rule.vty M tests/upf.vty 8 files changed, 153 insertions(+), 15 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve neels: Looks good to me, approved laforge: Looks good to me, but someone else must approve diff --git a/include/osmocom/upf/upf.h b/include/osmocom/upf/upf.h index 735a724..fd4019c 100644 --- a/include/osmocom/upf/upf.h +++ b/include/osmocom/upf/upf.h @@ -66,6 +66,12 @@ struct llist_head devs; }; +/* Item in an llist of string pointers */ +struct string_listitem { + struct llist_head entry; + char *str; +}; + struct g_upf { struct ctrl_handle *ctrl; @@ -100,6 +106,9 @@ char *table_name; int priority; uint32_t next_id_state; + + /* list of struct string_listitem */ + struct llist_head rule_append; } nft; struct llist_head netinst; diff --git a/include/osmocom/upf/upf_nft.h b/include/osmocom/upf/upf_nft.h index 4cdcb51..8333877 100644 --- a/include/osmocom/upf/upf_nft.h +++ b/include/osmocom/upf/upf_nft.h @@ -49,6 +49,7 @@ int upf_nft_init(); int upf_nft_free(); -char *upf_nft_tunmap_get_ruleset_str(void *ctx, struct upf_nft_tunmap_desc *tunmap); -int upf_nft_tunmap_create(struct upf_nft_tunmap_desc *tunmap); +char *upf_nft_tunmap_get_ruleset_str(void *ctx, struct upf_nft_tunmap_desc *tunmap, + const struct llist_head *rule_append); +int upf_nft_tunmap_create(struct upf_nft_tunmap_desc *tunmap, const struct llist_head *rule_append); int upf_nft_tunmap_delete(struct upf_nft_tunmap_desc *tunmap); diff --git a/src/osmo-upf/up_gtp_action.c b/src/osmo-upf/up_gtp_action.c index 84af8e5..8ce8a6f 100644 --- a/src/osmo-upf/up_gtp_action.c +++ b/src/osmo-upf/up_gtp_action.c @@ -130,7 +130,7 @@ return -ENOENT; } if (enable) - rc = upf_nft_tunmap_create(&a->tunmap); + rc = upf_nft_tunmap_create(&a->tunmap, &g_upf->nft.rule_append); else rc = upf_nft_tunmap_delete(&a->tunmap); if (rc) { diff --git a/src/osmo-upf/upf.c b/src/osmo-upf/upf.c index 0a84799..1476270 100644 --- a/src/osmo-upf/upf.c +++ b/src/osmo-upf/upf.c @@ -61,6 +61,7 @@ INIT_LLIST_HEAD(&g_upf->gtp.vty_cfg.devs); INIT_LLIST_HEAD(&g_upf->gtp.devs); + INIT_LLIST_HEAD(&g_upf->nft.rule_append); INIT_LLIST_HEAD(&g_upf->netinst); } diff --git a/src/osmo-upf/upf_nft.c b/src/osmo-upf/upf_nft.c index 81ca9d0..ed3e869 100644 --- a/src/osmo-upf/upf_nft.c +++ b/src/osmo-upf/upf_nft.c @@ -126,9 +126,11 @@ static int tunmap_single_direction(char *buf, size_t buflen, const struct upf_nft_args *args, const struct upf_nft_args_peer *from_peer, - const struct upf_nft_args_peer *to_peer) + const struct upf_nft_args_peer *to_peer, + const struct llist_head *rule_append) { struct osmo_strbuf sb = { .buf = buf, .len = buflen }; + OSMO_STRBUF_PRINTF(sb, "add rule inet %s " NFT_CHAIN_NAME_PREFIX_TUNMAP "%u", args->table_name, args->chain_id); /* Match only UDP packets */ @@ -153,12 +155,20 @@ OSMO_STRBUF_PRINTF(sb, " @ih,32,32 set 0x%08x", to_peer->teid_remote); OSMO_STRBUF_PRINTF(sb, " counter"); + + if (rule_append) { + struct string_listitem *i; + llist_for_each_entry(i, rule_append, entry) + OSMO_STRBUF_PRINTF(sb, " %s", i->str); + } + OSMO_STRBUF_PRINTF(sb, ";\n"); return sb.chars_needed; } -static int upf_nft_ruleset_tunmap_create_buf(char *buf, size_t buflen, const struct upf_nft_args *args) +static int upf_nft_ruleset_tunmap_create_buf(char *buf, size_t buflen, const struct upf_nft_args *args, + const struct llist_head *rule_append) { struct osmo_strbuf sb = { .buf = buf, .len = buflen }; @@ -167,16 +177,17 @@ args->table_name, args->chain_id, args->priority); /* Forwarding from peer_a to peer_b */ - OSMO_STRBUF_APPEND(sb, tunmap_single_direction, args, &args->peer_a, &args->peer_b); + OSMO_STRBUF_APPEND(sb, tunmap_single_direction, args, &args->peer_a, &args->peer_b, rule_append); /* And from peer_b to peer_a */ - OSMO_STRBUF_APPEND(sb, tunmap_single_direction, args, &args->peer_b, &args->peer_a); + OSMO_STRBUF_APPEND(sb, tunmap_single_direction, args, &args->peer_b, &args->peer_a, rule_append); return sb.chars_needed; } -static char *upf_nft_ruleset_tunmap_create_c(void *ctx, const struct upf_nft_args *args) +static char *upf_nft_ruleset_tunmap_create_c(void *ctx, const struct upf_nft_args *args, + const struct llist_head *rule_append) { - OSMO_NAME_C_IMPL(ctx, 512, "ERROR", upf_nft_ruleset_tunmap_create_buf, args) + OSMO_NAME_C_IMPL(ctx, 512, "ERROR", upf_nft_ruleset_tunmap_create_buf, args, rule_append) } static int upf_nft_ruleset_tunmap_delete_buf(char *buf, size_t buflen, const struct upf_nft_args *args) @@ -218,7 +229,8 @@ }; } -char *upf_nft_tunmap_get_ruleset_str(void *ctx, struct upf_nft_tunmap_desc *tunmap) +char *upf_nft_tunmap_get_ruleset_str(void *ctx, struct upf_nft_tunmap_desc *tunmap, + const struct llist_head *rule_append) { struct upf_nft_args args; @@ -231,12 +243,12 @@ } upf_nft_args_from_tunmap_desc(&args, tunmap); - return upf_nft_ruleset_tunmap_create_c(ctx, &args); + return upf_nft_ruleset_tunmap_create_c(ctx, &args, rule_append); } -int upf_nft_tunmap_create(struct upf_nft_tunmap_desc *tunmap) +int upf_nft_tunmap_create(struct upf_nft_tunmap_desc *tunmap, const struct llist_head *rule_append) { - return upf_nft_run(upf_nft_tunmap_get_ruleset_str(OTC_SELECT, tunmap)); + return upf_nft_run(upf_nft_tunmap_get_ruleset_str(OTC_SELECT, tunmap, rule_append)); } int upf_nft_tunmap_delete(struct upf_nft_tunmap_desc *tunmap) diff --git a/src/osmo-upf/upf_vty.c b/src/osmo-upf/upf_vty.c index 6d74b21..4c683c8 100644 --- a/src/osmo-upf/upf_vty.c +++ b/src/osmo-upf/upf_vty.c @@ -215,6 +215,8 @@ static int config_write_tunmap(struct vty *vty) { + struct string_listitem *i; + vty_out(vty, "tunmap%s", VTY_NEWLINE); if (g_upf->nft.mockup) @@ -222,6 +224,9 @@ if (g_upf->nft.table_name && strcmp(g_upf->nft.table_name, "osmo-upf")) vty_out(vty, " table-name %s%s", g_upf->nft.table_name, VTY_NEWLINE); + + llist_for_each_entry(i, &g_upf->nft.rule_append, entry) + vty_out(vty, " nft-rule tunmap append %s%s", i->str, VTY_NEWLINE); return CMD_SUCCESS; } @@ -257,6 +262,49 @@ #define NFT_RULE_STR "nftables rule specifics\n" #define TUNMAP_STR "GTP tunmap use case (a.k.a. forwarding between two GTP tunnels)\n" +DEFUN(cfg_tunmap_nft_rule_append, cfg_tunmap_nft_rule_append_cmd, + "nft-rule tunmap append .NFT_RULE", + NFT_RULE_STR TUNMAP_STR + "To each tunmap nft rule, append the given text. For example, 'nft-rule append meta nftrace set 1' adds the nftables" + " instructions 'meta nftrace set 1' to each of the tunmap rules passed to netfilter. This command is cumulative," + " multiple 'nft-rule append' will append all of the items.\n" + "The text to append\n") +{ + struct string_listitem *i; + i = talloc_zero(g_upf, struct string_listitem); + i->str = argv_concat(argv, argc, 0); + talloc_steal(i, i->str); + llist_add_tail(&i->entry, &g_upf->nft.rule_append); + return CMD_SUCCESS; +} + +DEFUN(cfg_tunmap_no_nft_rule_append, cfg_tunmap_no_nft_rule_append_cmd, + "no nft-rule tunmap append", + NO_STR NFT_RULE_STR TUNMAP_STR + "Drop all additions to tunmap nft rules added by earlier 'nft-rule append' config\n") +{ + struct string_listitem *i; + while ((i = llist_first_entry_or_null(&g_upf->nft.rule_append, struct string_listitem, entry))) { + llist_del(&i->entry); + talloc_free(i); + } + return CMD_SUCCESS; +} + +DEFUN(show_nft_rule_append, show_nft_rule_append_cmd, + "show nft-rule tunmap append", + SHOW_STR NFT_RULE_STR TUNMAP_STR "List all tunmap 'nft-rule append' entries\n") +{ + struct string_listitem *i; + if (llist_empty(&g_upf->nft.rule_append)) { + vty_out(vty, " no nft-rule tunmap append%s", VTY_NEWLINE); + return CMD_SUCCESS; + } + llist_for_each_entry(i, &g_upf->nft.rule_append, entry) + vty_out(vty, " nft-rule tunmap append %s%s", i->str, VTY_NEWLINE); + return CMD_SUCCESS; +} + DEFUN(show_nft_rule_tunmap_example, show_nft_rule_tunmap_example_cmd, "show nft-rule tunmap example", SHOW_STR NFT_RULE_STR TUNMAP_STR @@ -287,7 +335,7 @@ osmo_sockaddr_str_from_str2(&str, "3.3.3.3"); osmo_sockaddr_str_to_sockaddr(&str, &d.core.gtp_remote_addr.u.sas); - vty_out(vty, "%s%s", upf_nft_tunmap_get_ruleset_str(OTC_SELECT, &d), VTY_NEWLINE); + vty_out(vty, "%s%s", upf_nft_tunmap_get_ruleset_str(OTC_SELECT, &d, &g_upf->nft.rule_append), VTY_NEWLINE); return CMD_SUCCESS; } @@ -449,6 +497,7 @@ install_element_ve(&show_gtp_cmd); install_element_ve(&show_session_cmd); install_element_ve(&show_netinst_cmd); + install_element_ve(&show_nft_rule_append_cmd); install_node(&cfg_pfcp_node, config_write_pfcp); install_element(CONFIG_NODE, &cfg_pfcp_cmd); @@ -472,6 +521,9 @@ install_element(TUNMAP_NODE, &cfg_tunmap_mockup_cmd); install_element(TUNMAP_NODE, &cfg_tunmap_no_mockup_cmd); install_element(TUNMAP_NODE, &cfg_tunmap_table_name_cmd); + install_element(TUNMAP_NODE, &cfg_tunmap_nft_rule_append_cmd); + install_element(TUNMAP_NODE, &cfg_tunmap_no_nft_rule_append_cmd); + install_element(TUNMAP_NODE, &show_nft_rule_append_cmd); install_element(TUNMAP_NODE, &show_nft_rule_tunmap_example_cmd); install_node(&cfg_netinst_node, config_write_netinst); diff --git a/tests/nft-rule.vty b/tests/nft-rule.vty index f328871..7e8952b 100644 --- a/tests/nft-rule.vty +++ b/tests/nft-rule.vty @@ -2,6 +2,52 @@ OsmoUPF# configure terminal OsmoUPF(config)# tunmap +OsmoUPF(config-tunmap)# show nft-rule tunmap append + no nft-rule tunmap append +OsmoUPF(config-tunmap)# show nft-rule tunmap example +add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter; + +OsmoUPF(config-tunmap)# nft-rule tunmap append meta nftrace set 1 +OsmoUPF(config-tunmap)# show nft-rule tunmap append + nft-rule tunmap append meta nftrace set 1 +OsmoUPF(config-tunmap)# show nft-rule tunmap example +add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter meta nftrace set 1; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter meta nftrace set 1; + +OsmoUPF(config-tunmap)# nft-rule tunmap append foo +OsmoUPF(config-tunmap)# show nft-rule tunmap append + nft-rule tunmap append meta nftrace set 1 + nft-rule tunmap append foo +OsmoUPF(config-tunmap)# show nft-rule tunmap example +add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter meta nftrace set 1 foo; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter meta nftrace set 1 foo; + +OsmoUPF(config-tunmap)# nft-rule tunmap append bar +OsmoUPF(config-tunmap)# show nft-rule tunmap append + nft-rule tunmap append meta nftrace set 1 + nft-rule tunmap append foo + nft-rule tunmap append bar +OsmoUPF(config-tunmap)# show nft-rule tunmap example +add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter meta nftrace set 1 foo bar; +add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.3 @ih,32,32 0x00000203 ip saddr set 2.2.2.1 ip daddr set 1.1.1.1 @ih,32,32 set 0x00000102 counter meta nftrace set 1 foo bar; + +OsmoUPF(config-tunmap)# show running-config +... +tunmap +... + nft-rule tunmap append meta nftrace set 1 + nft-rule tunmap append foo + nft-rule tunmap append bar +... + +OsmoUPF(config-tunmap)# no nft-rule tunmap append +OsmoUPF(config-tunmap)# show nft-rule tunmap append + no nft-rule tunmap append OsmoUPF(config-tunmap)# show nft-rule tunmap example add chain inet osmo-upf tunmap123 { type filter hook prerouting priority -300; } add rule inet osmo-upf tunmap123 meta l4proto udp ip daddr 2.2.2.1 @ih,32,32 0x00000201 ip saddr set 2.2.2.3 ip daddr set 3.3.3.3 @ih,32,32 set 0x00000302 counter; diff --git a/tests/upf.vty b/tests/upf.vty index 8931719..51ebeb3 100644 --- a/tests/upf.vty +++ b/tests/upf.vty @@ -52,6 +52,9 @@ mockup no mockup table-name TABLE_NAME + nft-rule tunmap append .NFT_RULE + no nft-rule tunmap append + show nft-rule tunmap append show nft-rule tunmap example OsmoUPF(config-tunmap)# exit @@ -61,18 +64,31 @@ mockup no mockup table-name TABLE_NAME + nft-rule tunmap append .NFT_RULE + no nft-rule tunmap append + show nft-rule tunmap append show nft-rule tunmap example OsmoUPF(config-tunmap)# mockup? mockup don't actually send rulesets to nftables, just return success OsmoUPF(config-tunmap)# no ? - mockup operate nftables rulesets normally + mockup operate nftables rulesets normally + nft-rule nftables rule specifics OsmoUPF(config-tunmap)# table-name? table-name Set the nft inet table name to create and place GTP tunnel forwarding chains in (as in 'nft add table inet foo'). If multiple instances of osmo-upf are running on the same system, each osmo-upf must have its own table name. Otherwise the names of created forwarding chains will collide. The default table name is "osmo-upf". OsmoUPF(config-tunmap)# table-name ? TABLE_NAME nft inet table name +OsmoUPF(config-tunmap)# nft-rule? + nft-rule nftables rule specifics +OsmoUPF(config-tunmap)# nft-rule ? + tunmap GTP tunmap use case (a.k.a. forwarding between two GTP tunnels) +OsmoUPF(config-tunmap)# nft-rule tunmap ? + append To each tunmap nft rule, append the given text. For example, 'nft-rule append meta nftrace set 1' adds the nftables instructions 'meta nftrace set 1' to each of the tunmap rules passed to netfilter. This command is cumulative, multiple 'nft-rule append' will append all of the items. +OsmoUPF(config-tunmap)# nft-rule tunmap append ? + NFT_RULE The text to append + OsmoUPF(config-tunmap)# show? show Show running system information OsmoUPF(config-tunmap)# show ? @@ -82,4 +98,5 @@ OsmoUPF(config-tunmap)# show nft-rule ? tunmap GTP tunmap use case (a.k.a. forwarding between two GTP tunnels) OsmoUPF(config-tunmap)# show nft-rule tunmap ? + append List all tunmap 'nft-rule append' entries example Print a complete nftables ruleset for a tunmap filled with example IP addresses and TEIDs -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ia1fac67108902a48b43d8d1dc184ccf541fd9ba8 Gerrit-Change-Number: 30500 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-MessageType: merged
1 0
0 0
Change in osmo-upf[master]: add cfg: tunmap / nft-rule append
by neels 13 Dec '22

13 Dec '22
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-upf/+/30500 ) Change subject: add cfg: tunmap / nft-rule append ...................................................................... Patch Set 3: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/30500 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Ia1fac67108902a48b43d8d1dc184ccf541fd9ba8 Gerrit-Change-Number: 30500 Gerrit-PatchSet: 3 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de> Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Tue, 13 Dec 2022 23:04:28 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-bsc[master]: fix Speech Codec cfg in BSSMAP Assignment Complete
by neels 13 Dec '22

13 Dec '22
neels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/30583 ) Change subject: fix Speech Codec cfg in BSSMAP Assignment Complete ...................................................................... fix Speech Codec cfg in BSSMAP Assignment Complete In send_assignment_complete(), obviously return the current channel configuration from lchan->current_ch_mode_rate, which is the proper place to get the channel mode after RSL Chan Activ Ack. It is interesting to look at the history of this line of code. lchan->current_ch_mode_rate was added later, so now the mistake is very obvious. Related: SYS#6229 Change-Id: I3bf8f5ea9ae2a3c12fc5b483818d550a069fe66e --- M src/osmo-bsc/assignment_fsm.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/83/30583/1 diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index f00b26d..14944d2 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -222,7 +222,7 @@ if (gscon_is_aoip(conn)) { /* Extrapolate speech codec from speech mode */ gsm0808_speech_codec_from_chan_type(&sc, perm_spch); - sc.cfg = conn->lchan->activate.ch_mode_rate.s15_s0; + sc.cfg = conn->lchan->current_ch_mode_rate.s15_s0; sc_ptr = &sc; } } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/30583 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I3bf8f5ea9ae2a3c12fc5b483818d550a069fe66e Gerrit-Change-Number: 30583 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • ...
  • 198
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.