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

November 2026

  • 1 participants
  • 714 discussions
[S] Change in libosmo-sigtran[master]: tcap_as_loadshare: close the ASP connection when receiving an invalid...
by lynxis 13 Nov '26

13 Nov '26
lynxis has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/44076?usp=email ) Change subject: tcap_as_loadshare: close the ASP connection when receiving an invalid message ...................................................................... tcap_as_loadshare: close the ASP connection when receiving an invalid message Related: SYS#8286 Change-Id: Iae3d2ebce2e984db497794297696af36ca7f010b --- M src/tcap_as_loadshare.c 1 file changed, 25 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/76/44076/1 diff --git a/src/tcap_as_loadshare.c b/src/tcap_as_loadshare.c index 6a923e8..d490319 100644 --- a/src/tcap_as_loadshare.c +++ b/src/tcap_as_loadshare.c @@ -904,9 +904,9 @@ if (cs7_role != CS7_ROLE_SG) { LOGPASP(asp, DLTCAP, LOGL_ERROR, - "Rx unexpected OSMO IPA EXT TCAP ROUTING msg in role != CS7_ROLE_SG!\n"); + "Rx unexpected OSMO IPA EXT TCAP ROUTING msg in role != CS7_ROLE_SG! Closing connection.\n"); rc = -ENOENT; - goto out; + goto err_close; } /* in the IPA case, we assume there is a 1:1 mapping between the @@ -915,17 +915,17 @@ * know the identity of the peer */ as = ss7_asp_get_first_as(asp); if (!as) { - LOGPASP(asp, DLTCAP, LOGL_ERROR, "Rx message for IPA ASP without AS?!\n"); + LOGPASP(asp, DLTCAP, LOGL_ERROR, "Rx message for IPA ASP without AS?! Closing connection.\n"); rc = -ENOENT; - goto out; + goto err_close; } /* pull the IPA and OSMO_EXT header */ hdr = (struct ipa_tcap_routing_hdr *) msgb_data(msg); if (msgb_length(msg) < sizeof(struct ipa_tcap_routing_hdr)) { - LOGPASP(asp, DLTCAP, LOGL_ERROR, "TCAP routing message too short\n"); + LOGPASP(asp, DLTCAP, LOGL_ERROR, "TCAP routing message too short. Closing connection.\n"); rc = -EINVAL; - goto out; + goto err_close; } if (!as->cfg.loadshare.tcap.enabled || as->cfg.mode != OSMO_SS7_AS_TMOD_LOADSHARE) @@ -939,9 +939,9 @@ struct ipa_tcap_routing_add_range tcar = {}; if (msgb_length(msg) < sizeof(*hdr) + sizeof(struct ipa_tcap_routing_add_range)) { - LOGPASP(asp, DLTCAP, LOGL_ERROR, "TCAP routing message is too small\n"); + LOGPASP(asp, DLTCAP, LOGL_ERROR, "TCAP Add Range message is too small\n"); rc = -EINVAL; - goto out; + goto err_close; } msgb_pull(msg, sizeof(*hdr)); @@ -981,9 +981,9 @@ } case MT_TID_ACCEPT_NEW_TRANS: if (msgb_length(msg) < sizeof(*hdr) + sizeof(struct ipa_tcap_routing_accept_new_trans)) { - LOGPASP(asp, DLTCAP, LOGL_ERROR, "TCAP routing message is too small (accept new transactions)\n"); + LOGPASP(asp, DLTCAP, LOGL_ERROR, "TCAP New Transaction message is too small\n"); rc = -EINVAL; - goto out; + goto err_close; } msgb_pull(msg, sizeof(*hdr)); @@ -991,22 +991,34 @@ asp->tcap.accept_new_trans = msgb_pull_u8(msg) & 0x1; if (asp->tcap.accept_new_trans) LOGPASP(asp, DLTCAP, LOGL_INFO, - "TCAP New transaction command: ASP will receive new TCAP transactions\n"); + "TCAP New transaction message: ASP will receive new TCAP transactions\n"); else LOGPASP(asp, DLTCAP, LOGL_INFO, - "TCAP New transaction command: ASP won't receive new TCAP transactions\n"); + "TCAP New transaction message: ASP won't receive new TCAP transactions\n"); rc = ipa_tx_tcap_routing_ack(asp, osmo_ntohl(hdr->seq)); break; case MT_TID_ACK: /* shouldn't received from other end */ case MT_TID_NACK: /* shouldn't received from other end */ - default: + LOGPASP(asp, DLTCAP, LOGL_INFO, + "TCAP ACK / NACK message received, but not valid for this role. Closing connection.\n"); rc = -EINVAL; + goto err_close; + break; + default: + LOGPASP(asp, DLTCAP, LOGL_INFO, + "TCAP unknown routing message received. Closing connection.\n"); + rc = -EINVAL; + goto err_close; break; } out: return rc; + +err_close: + osmo_ss7_asp_disconnect(asp); + return rc; } /* update the short cuts contains_pc & contains_ssn */ -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/44076?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Iae3d2ebce2e984db497794297696af36ca7f010b Gerrit-Change-Number: 44076 Gerrit-PatchSet: 1 Gerrit-Owner: lynxis <lynxis(a)fe80.eu>
1 0
0 0
[M] Change in libosmo-sigtran[master]: tcap_as_loadshare: add TCAP IPA MT_TID_ACCEPT_NEW_TRAN
by lynxis 13 Nov '26

13 Nov '26
Attention is currently required from: pespin. Hello Jenkins Builder, pespin, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43999?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Verified+1 by Jenkins Builder Change subject: tcap_as_loadshare: add TCAP IPA MT_TID_ACCEPT_NEW_TRAN ...................................................................... tcap_as_loadshare: add TCAP IPA MT_TID_ACCEPT_NEW_TRAN With MT_TID_ACCEPT_NEW_TRANS a TCAP loadsharing ASP can control if it receives new TCAP transactions (TCAP Begin messages). When disabled, a TCAP loadsharing ASP will still receive TCAP transaction inside their TCAP range as well transaction associated via transaction tracking. Related: SYS#8283 Change-Id: Id4e7bb022a0c8b52369f6ded2729cf6cf8679556 --- M src/ss7_asp.c M src/ss7_asp.h M src/tcap_as_loadshare.c M src/tcap_as_loadshare.h M src/tcap_as_loadshare_vty.c 5 files changed, 101 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-sigtran refs/changes/99/43999/4 -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43999?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Id4e7bb022a0c8b52369f6ded2729cf6cf8679556 Gerrit-Change-Number: 43999 Gerrit-PatchSet: 4 Gerrit-Owner: lynxis <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmo-sigtran[master]: tcap_as_loadshare: add TCAP IPA MT_TID_ACCEPT_NEW_TRAN
by lynxis 13 Nov '26

13 Nov '26
Attention is currently required from: pespin. lynxis has posted comments on this change by lynxis. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43999?usp=email ) Change subject: tcap_as_loadshare: add TCAP IPA MT_TID_ACCEPT_NEW_TRAN ...................................................................... Patch Set 3: (5 comments) File src/tcap_as_loadshare.c: https://gerrit.osmocom.org/c/libosmo-sigtran/+/43999/comment/5d4e2b51_a9040… : PS2, Line 985: goto out; > What do you mean? why not sending it here? that we need to fix it for all branches which uses `goto out`. https://gerrit.osmocom.org/c/libosmo-sigtran/+/43999/comment/1237faa9_dc2c8… : PS2, Line 990: asp->tcap.enabled = true; > I'd leave it as before and simply add a new message which can be sent before enabling it, this follo […] Done File src/tcap_as_loadshare.c: https://gerrit.osmocom.org/c/libosmo-sigtran/+/43999/comment/0e01f5ab_1faae… : PS3, Line 264: assoc->asp->tcap.enabled && assoc->asp->tcap.accept_new_trans) > Please put the added condition into a new line. Done https://gerrit.osmocom.org/c/libosmo-sigtran/+/43999/comment/4b663ca4_5e81f… : PS3, Line 264: assoc->asp->tcap.enabled && assoc->asp->tcap.accept_new_trans) > Please put the added condition into a new line. Done File src/tcap_as_loadshare_vty.c: https://gerrit.osmocom.org/c/libosmo-sigtran/+/43999/comment/99fdbaf6_d4a95… : PS3, Line 161: if (!assoc->asp->tcap.enabled || !osmo_ss7_asp_active(assoc->asp)) > it probably makes sense to also print the inactive ones and add a column which prints "ACTIVE" | "IN […] The other I found, was using Yes and No. But there can't be any inactive ASP in this table, because tcap.enabled can't be true for any inactive one -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/43999?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: Id4e7bb022a0c8b52369f6ded2729cf6cf8679556 Gerrit-Change-Number: 43999 Gerrit-PatchSet: 3 Gerrit-Owner: lynxis <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 13 Nov 2026 19:37:47 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de> Comment-In-Reply-To: lynxis <lynxis(a)fe80.eu>
1 0
0 0
[S] Change in osmo-hnbgw[master]: vty: Support configuring local PFCP Node ID
by pespin 13 Nov '26

13 Nov '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/44075?usp=email ) Change subject: vty: Support configuring local PFCP Node ID ...................................................................... vty: Support configuring local PFCP Node ID Related: SYS#7719 Depends: libosmo-pfcp.git Change-Id Ibfb53fddb618a4480d873ceb783e56c0a0e5fead Change-Id: Iaa6b0ca03f042c6d6538855559eff1353a6dc3ee --- M TODO-RELEASE M include/osmocom/hnbgw/hnbgw.h M src/osmo-hnbgw/hnbgw_pfcp.c M src/osmo-hnbgw/hnbgw_vty.c M tests/pfcp_cfg.vty.with_pfcp 5 files changed, 36 insertions(+), 11 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/75/44075/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 5e970b9..f4443e1 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line libosmo-sigtran >2.3.0 OSMO_SCCP_REL_REASON_NSU_* libosmo-sigtran >2.3.0 OSMO_SCCP_RETURN_REASON_*, osmo_sccp_return_reason_name() +libosmo-pfcp >0.7.0 osmo_pfcp_ie_node_id_from_str() diff --git a/include/osmocom/hnbgw/hnbgw.h b/include/osmocom/hnbgw/hnbgw.h index 36e8943..6560adf 100644 --- a/include/osmocom/hnbgw/hnbgw.h +++ b/include/osmocom/hnbgw/hnbgw.h @@ -105,6 +105,7 @@ uint16_t local_port; char *remote_addr; uint16_t remote_port; + char *node_id; struct { char *access; char *core; diff --git a/src/osmo-hnbgw/hnbgw_pfcp.c b/src/osmo-hnbgw/hnbgw_pfcp.c index 1f858e0..86efe19 100644 --- a/src/osmo-hnbgw/hnbgw_pfcp.c +++ b/src/osmo-hnbgw/hnbgw_pfcp.c @@ -163,18 +163,15 @@ } LOGP(DLPFCP, LOGL_DEBUG, "%p cfg: pfcp remote-addr %s\n", g_hnbgw, g_hnbgw->config.pfcp.remote_addr); - if (!g_hnbgw->config.pfcp.local_addr) { - LOGP(DLPFCP, LOGL_ERROR, "Configuration error: missing local PFCP address, required for Node Id\n"); - return -1; - } - cfg = (struct osmo_pfcp_endpoint_cfg){ .set_msg_ctx_cb = pfcp_set_msg_ctx, .rx_msg_cb = pfcp_rx_msg, }; /* Set up PFCP endpoint's local node id from local IP address. Parse address string into local_addr_str... */ - if (osmo_sockaddr_str_from_str(&local_addr_str, g_hnbgw->config.pfcp.local_addr, g_hnbgw->config.pfcp.local_port)) { + if (osmo_sockaddr_str_from_str(&local_addr_str, + g_hnbgw->config.pfcp.local_addr, + g_hnbgw->config.pfcp.local_port)) { LOGP(DLPFCP, LOGL_ERROR, "Error in PFCP local IP: %s\n", osmo_quote_str_c(OTC_SELECT, g_hnbgw->config.pfcp.local_addr, -1)); return -1; @@ -185,11 +182,20 @@ osmo_quote_str_c(OTC_SELECT, g_hnbgw->config.pfcp.local_addr, -1)); return -1; } - /* also store the local addr as local Node ID */ - if (osmo_pfcp_ie_node_id_from_osmo_sockaddr(&cfg.local_node_id, &cfg.local_addr)) { - LOGP(DLPFCP, LOGL_ERROR, "Error in PFCP local IP: %s\n", - osmo_quote_str_c(OTC_SELECT, g_hnbgw->config.pfcp.local_addr, -1)); - return -1; + + if (g_hnbgw->config.pfcp.node_id) { + /* Set up PFCP endpoint's Node ID from VTY config: */ + if (osmo_pfcp_ie_node_id_from_str(&cfg.local_node_id, g_hnbgw->config.pfcp.node_id)) { + LOGP(DLPFCP, LOGL_ERROR, "Error in PFCP local Node ID %s\n", + g_hnbgw->config.pfcp.node_id); + return -1; + } + } else { + if (osmo_pfcp_ie_node_id_from_osmo_sockaddr(&cfg.local_node_id, &cfg.local_addr)) { + LOGP(DLPFCP, LOGL_ERROR, "Error in PFCP local IP: %s\n", + osmo_quote_str_c(OTC_SELECT, g_hnbgw->config.pfcp.local_addr, -1)); + return -1; + } } /* Set up remote PFCP address to reach UPF at. First parse the string into upf_addr_str. */ diff --git a/src/osmo-hnbgw/hnbgw_vty.c b/src/osmo-hnbgw/hnbgw_vty.c index aec0bbe..2857e4d 100644 --- a/src/osmo-hnbgw/hnbgw_vty.c +++ b/src/osmo-hnbgw/hnbgw_vty.c @@ -1055,6 +1055,16 @@ return CMD_SUCCESS; } +DEFUN(cfg_pfcp_node_id, cfg_pfcp_node_id_cmd, + "node-id (IP_ADDR|FQDN)", + "Set the local Node ID to transmit over PFCP\n" + "IPv4 or IPv6 address\n" + "FQDN\n") +{ + osmo_talloc_replace_string(g_hnbgw, &g_hnbgw->config.pfcp.node_id, argv[0]); + return CMD_SUCCESS; +} + DEFUN(cfg_pfcp_netinst, cfg_pfcp_netinst_cmd, "netinst (access|core) NAME", "Add a Network Instance IE to all outgoing PFCP rule sets," @@ -1209,6 +1219,8 @@ vty_out(vty, " local-port %u%s", g_hnbgw->config.pfcp.local_port, VTY_NEWLINE); if (g_hnbgw->config.pfcp.remote_addr) vty_out(vty, " remote-addr %s%s", g_hnbgw->config.pfcp.remote_addr, VTY_NEWLINE); + if (g_hnbgw->config.pfcp.node_id) + vty_out(vty, " node-id %s%s", g_hnbgw->config.pfcp.node_id, VTY_NEWLINE); if (g_hnbgw->config.pfcp.netinst.access && *g_hnbgw->config.pfcp.netinst.access) vty_out(vty, " netinst access %s%s", g_hnbgw->config.pfcp.netinst.access, VTY_NEWLINE); @@ -1295,6 +1307,7 @@ install_element(PFCP_NODE, &cfg_pfcp_local_addr_cmd); install_element(PFCP_NODE, &cfg_pfcp_local_port_cmd); install_element(PFCP_NODE, &cfg_pfcp_remote_addr_cmd); + install_element(PFCP_NODE, &cfg_pfcp_node_id_cmd); install_element(PFCP_NODE, &cfg_pfcp_netinst_cmd); #endif diff --git a/tests/pfcp_cfg.vty.with_pfcp b/tests/pfcp_cfg.vty.with_pfcp index 50304f7..21a33ac 100644 --- a/tests/pfcp_cfg.vty.with_pfcp +++ b/tests/pfcp_cfg.vty.with_pfcp @@ -15,6 +15,7 @@ local-addr IP_ADDR local-port <1-65535> remote-addr IP_ADDR + node-id (IP_ADDR|FQDN) netinst (access|core) NAME OsmoHNBGW(config-hnbgw-pfcp)# local-addr? @@ -32,6 +33,9 @@ OsmoHNBGW(config-hnbgw-pfcp)# remote-addr ? IP_ADDR IP address +OsmoHNBGW(config-hnbgw-pfcp)# node-id? + node-id Set the local Node ID to transmit over PFCP + OsmoHNBGW(config-hnbgw-pfcp)# netinst? netinst Add a Network Instance IE to all outgoing PFCP rule sets, so that the UPF may choose the correct interface to open GTP tunnels on. OsmoHNBGW(config-hnbgw-pfcp)# netinst ? -- To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/44075?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-hnbgw Gerrit-Branch: master Gerrit-Change-Id: Iaa6b0ca03f042c6d6538855559eff1353a6dc3ee Gerrit-Change-Number: 44075 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-upf[master]: vty: Support configuring local PFCP Node ID
by pespin 13 Nov '26

13 Nov '26
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-upf/+/44074?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: vty: Support configuring local PFCP Node ID ...................................................................... vty: Support configuring local PFCP Node ID Related: SYS#7719 Depends: libosmo-pfcp.git Change-Id Ibfb53fddb618a4480d873ceb783e56c0a0e5fead Change-Id: Iaba51a7f3d6b357ab6d484e073653422178adac7 --- M TODO-RELEASE M include/osmocom/upf/up_endpoint.h M include/osmocom/upf/upf.h M src/osmo-upf/up_endpoint.c M src/osmo-upf/upf.c M src/osmo-upf/upf_vty.c M tests/upf.vty 7 files changed, 47 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/74/44074/3 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/44074?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Iaba51a7f3d6b357ab6d484e073653422178adac7 Gerrit-Change-Number: 44074 Gerrit-PatchSet: 3 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in osmo-upf[master]: vty: Support configuring local PFCP Node ID
by pespin 13 Nov '26

13 Nov '26
Attention is currently required from: pespin. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/osmo-upf/+/44074?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: vty: Support configuring local PFCP Node ID ...................................................................... vty: Support configuring local PFCP Node ID Related: SYS#7719 Depends: libosmo-pfcp.git Change-Id Ibfb53fddb618a4480d873ceb783e56c0a0e5fead Change-Id: Iaba51a7f3d6b357ab6d484e073653422178adac7 --- M TODO-RELEASE M include/osmocom/upf/up_endpoint.h M include/osmocom/upf/upf.h M src/osmo-upf/up_endpoint.c M src/osmo-upf/upf.c M src/osmo-upf/upf_vty.c M tests/upf.vty 7 files changed, 47 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/74/44074/2 -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/44074?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Iaba51a7f3d6b357ab6d484e073653422178adac7 Gerrit-Change-Number: 44074 Gerrit-PatchSet: 2 Gerrit-Owner: pespin <pespin(a)sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Attention: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-sigtran[master]: tcap_as_loadshare: refactor and cleanup tcap state
by lynxis 13 Nov '26

13 Nov '26
Attention is currently required from: pespin. lynxis has posted comments on this change by lynxis. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/44003?usp=email ) Change subject: tcap_as_loadshare: refactor and cleanup tcap state ...................................................................... Patch Set 2: (1 comment) File src/tcap_as_loadshare.c: https://gerrit.osmocom.org/c/libosmo-sigtran/+/44003/comment/1d34142c_98a5a… : PS2, Line 1112: void tcap_asp_down(struct osmo_ss7_as *as, struct osmo_ss7_asp *asp) > This is IMHO wrong: The asp_down should not have a specific AS being passed. […] But if you look into the code where tcap_asp_down is called, you find such loop. -- To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/44003?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sigtran Gerrit-Branch: master Gerrit-Change-Id: I4c748eb0fab83e0198637101a890ae4094e50116 Gerrit-Change-Number: 44003 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis <lynxis(a)fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: pespin <pespin(a)sysmocom.de> Gerrit-Attention: pespin <pespin(a)sysmocom.de> Gerrit-Comment-Date: Fri, 13 Nov 2026 16:44:14 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in osmo-upf[master]: vty: Support configuring local PFCP Node ID
by pespin 13 Nov '26

13 Nov '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-upf/+/44074?usp=email ) Change subject: vty: Support configuring local PFCP Node ID ...................................................................... vty: Support configuring local PFCP Node ID Related: SYS#7719 Depends: libosmo-pfcp.git Change-Id Ibfb53fddb618a4480d873ceb783e56c0a0e5fead Change-Id: Iaba51a7f3d6b357ab6d484e073653422178adac7 --- M TODO-RELEASE M include/osmocom/upf/up_endpoint.h M include/osmocom/upf/upf.h M src/osmo-upf/up_endpoint.c M src/osmo-upf/upf.c M src/osmo-upf/upf_vty.c 6 files changed, 41 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-upf refs/changes/74/44074/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 0ed7189..e6caf0f 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmo-pfcp >0.7.0 osmo_pfcp_ie_node_id_from_str() diff --git a/include/osmocom/upf/up_endpoint.h b/include/osmocom/upf/up_endpoint.h index 03fd23d..d96495f 100644 --- a/include/osmocom/upf/up_endpoint.h +++ b/include/osmocom/upf/up_endpoint.h @@ -28,6 +28,7 @@ struct osmo_pfcp_msg; struct osmo_pfcp_endpoint; +struct osmo_pfcp_ie_node_id; struct osmo_sockaddr; struct pfcp_node_peer; @@ -48,7 +49,9 @@ uint64_t next_up_seid_state; }; -struct up_endpoint *up_endpoint_alloc(void *ctx, const struct osmo_sockaddr *local_addr); +struct up_endpoint *up_endpoint_alloc(void *ctx, + const struct osmo_sockaddr *local_addr, + const struct osmo_pfcp_ie_node_id *node_id); int up_endpoint_bind(struct up_endpoint *up_ep); void up_endpoint_free(struct up_endpoint **ep); diff --git a/include/osmocom/upf/upf.h b/include/osmocom/upf/upf.h index 2f25c99..c2f5bcf 100644 --- a/include/osmocom/upf/upf.h +++ b/include/osmocom/upf/upf.h @@ -50,6 +50,7 @@ struct pfcp_vty_cfg { char *local_addr; uint16_t local_port; + char *node_id; }; struct tunend_vty_cfg_dev { diff --git a/src/osmo-upf/up_endpoint.c b/src/osmo-upf/up_endpoint.c index e1e845f..5a1fd36 100644 --- a/src/osmo-upf/up_endpoint.c +++ b/src/osmo-upf/up_endpoint.c @@ -351,7 +351,9 @@ } } -struct up_endpoint *up_endpoint_alloc(void *ctx, const struct osmo_sockaddr *local_addr) +struct up_endpoint *up_endpoint_alloc(void *ctx, + const struct osmo_sockaddr *local_addr, + const struct osmo_pfcp_ie_node_id *node_id) { struct osmo_pfcp_endpoint_cfg cfg; struct up_endpoint *up_ep; @@ -361,11 +363,11 @@ cfg = (struct osmo_pfcp_endpoint_cfg){ .local_addr = *local_addr, + .local_node_id = *node_id, .set_msg_ctx_cb = up_endpoint_set_msg_ctx, .rx_msg_cb = up_endpoint_rx_cb, .priv = up_ep, }; - osmo_pfcp_ie_node_id_from_osmo_sockaddr(&cfg.local_node_id, local_addr); up_ep->pfcp_ep = osmo_pfcp_endpoint_create(up_ep, &cfg); OSMO_ASSERT(up_ep->pfcp_ep); diff --git a/src/osmo-upf/upf.c b/src/osmo-upf/upf.c index 0c3a364..0dcc114 100644 --- a/src/osmo-upf/upf.c +++ b/src/osmo-upf/upf.c @@ -85,6 +85,8 @@ { struct osmo_sockaddr_str local_addr_str; struct osmo_sockaddr local_addr; + struct osmo_pfcp_ie_node_id local_node_id; + int rc; OSMO_ASSERT(g_upf); OSMO_ASSERT(g_upf->pfcp.ep == NULL); @@ -94,9 +96,24 @@ osmo_sockaddr_str_from_str(&local_addr_str, g_upf->pfcp.vty_cfg.local_addr, g_upf->pfcp.vty_cfg.local_port); osmo_sockaddr_str_to_sockaddr(&local_addr_str, &local_addr.u.sas); - g_upf->pfcp.ep = up_endpoint_alloc(g_upf, &local_addr); + if (g_upf->pfcp.vty_cfg.node_id) { + rc = osmo_pfcp_ie_node_id_from_str(&local_node_id, g_upf->pfcp.vty_cfg.node_id); + if (rc < 0) { + LOGP(DLPFCP, LOGL_ERROR, "PFCP: failed to parse local Node ID %s\n", + g_upf->pfcp.vty_cfg.node_id); + return rc; + } + } else { /* Pick Node ID from local PFCP address: */ + rc = osmo_pfcp_ie_node_id_from_osmo_sockaddr(&local_node_id, &local_addr); + if (rc < 0) { + LOGP(DLPFCP, LOGL_ERROR, "PFCP: failed to parse local Node ID from local address\n"); + return rc; + } + } + + g_upf->pfcp.ep = up_endpoint_alloc(g_upf, &local_addr, &local_node_id); if (!g_upf->pfcp.ep) { - fprintf(stderr, "Failed to allocate PFCP endpoint.\n"); + LOGP(DLPFCP, LOGL_ERROR, "Failed to allocate PFCP endpoint.\n"); return -1; } return 0; diff --git a/src/osmo-upf/upf_vty.c b/src/osmo-upf/upf_vty.c index cc446b3..a394452 100644 --- a/src/osmo-upf/upf_vty.c +++ b/src/osmo-upf/upf_vty.c @@ -70,6 +70,8 @@ vty_out(vty, "pfcp%s", VTY_NEWLINE); if (strcmp(UPF_PFCP_LISTEN_DEFAULT, pfcp_vty.local_addr)) vty_out(vty, " local-addr %s%s", pfcp_vty.local_addr, VTY_NEWLINE); + if (pfcp_vty.node_id) + vty_out(vty, " node-id %s%s", pfcp_vty.node_id, VTY_NEWLINE); return CMD_SUCCESS; } @@ -82,6 +84,15 @@ return CMD_SUCCESS; } +DEFUN(cfg_pfcp_node_id, cfg_pfcp_node_id_cmd, + "node-id (IP_ADDR|FQDN)", + "Set the local IP address to bind on for PFCP\n" + "IP address\n") +{ + osmo_talloc_replace_string(g_upf, &pfcp_vty.node_id, argv[0]); + return CMD_SUCCESS; +} + static struct cmd_node cfg_tunend_node = { TUNEND_NODE, "%s(config-tunend)# ", @@ -614,6 +625,7 @@ install_element(CONFIG_NODE, &cfg_pfcp_cmd); install_element(PFCP_NODE, &cfg_pfcp_local_addr_cmd); + install_element(PFCP_NODE, &cfg_pfcp_node_id_cmd); install_node(&cfg_tunend_node, config_write_tunend); install_element(CONFIG_NODE, &cfg_tunend_cmd); -- To view, visit https://gerrit.osmocom.org/c/osmo-upf/+/44074?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: osmo-upf Gerrit-Branch: master Gerrit-Change-Id: Iaba51a7f3d6b357ab6d484e073653422178adac7 Gerrit-Change-Number: 44074 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-pfcp[master]: pfcp_msg: Introduce API osmo_pfcp_ie_node_id_from_str()
by pespin 13 Nov '26

13 Nov '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/44073?usp=email ) Change subject: pfcp_msg: Introduce API osmo_pfcp_ie_node_id_from_str() ...................................................................... pfcp_msg: Introduce API osmo_pfcp_ie_node_id_from_str() This API is useful in parsing a string input containing an IP(v4 or v6) address or an FQDN. Related: SYS#7719 Depends: libosmocore.git Change-id I196dc4ab58ab300e2b16daeb214278cfb9bb8226 Change-Id: Ibfb53fddb618a4480d873ceb783e56c0a0e5fead --- M TODO-RELEASE M include/osmocom/pfcp/pfcp_msg.h M src/libosmo-pfcp/pfcp_msg.c 3 files changed, 33 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/73/44073/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 0ed7189..0c339f7 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,5 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmo-pfcp add osmo_pfcp_ie_node_id_from_str() +libosmcore >1.14.2 osmo_sockaddr_pton() diff --git a/include/osmocom/pfcp/pfcp_msg.h b/include/osmocom/pfcp/pfcp_msg.h index 2fde3e5..c0f8fb5 100644 --- a/include/osmocom/pfcp/pfcp_msg.h +++ b/include/osmocom/pfcp/pfcp_msg.h @@ -168,6 +168,7 @@ int osmo_pfcp_ie_node_id_from_osmo_sockaddr(struct osmo_pfcp_ie_node_id *node_id, const struct osmo_sockaddr *os); int osmo_pfcp_ie_node_id_to_osmo_sockaddr(const struct osmo_pfcp_ie_node_id *node_id, struct osmo_sockaddr *os); +int osmo_pfcp_ie_node_id_from_str(struct osmo_pfcp_ie_node_id *node_id, const char *str); int osmo_pfcp_ie_node_id_cmp(const struct osmo_pfcp_ie_node_id *a, const struct osmo_pfcp_ie_node_id *b); #define OSMO_PFCP_MSG_MEMB(M, OFS) ((OFS) <= 0 ? NULL : (void *)((uint8_t *)(M) + OFS)) diff --git a/src/libosmo-pfcp/pfcp_msg.c b/src/libosmo-pfcp/pfcp_msg.c index 2e0db31..ccf4fe1 100644 --- a/src/libosmo-pfcp/pfcp_msg.c +++ b/src/libosmo-pfcp/pfcp_msg.c @@ -135,6 +135,36 @@ return 0; } +int osmo_pfcp_ie_node_id_from_str(struct osmo_pfcp_ie_node_id *node_id, const char *str) +{ + int rc; + + if (!str) + return -EINVAL; + if (str[0] == '\0') + return -EINVAL; + + rc = osmo_sockaddr_pton(str, &node_id->ip.u.sa); + + if (rc != 1) { /* pton() failed, assume fqdn: */ + node_id->type = OSMO_PFCP_NODE_ID_T_FQDN; + OSMO_STRLCPY_ARRAY(node_id->fqdn, str); + return 0; + } + + switch (node_id->ip.u.sa.sa_family) { + case AF_INET: + node_id->type = OSMO_PFCP_NODE_ID_T_IPV4; + break; + case AF_INET6: + node_id->type = OSMO_PFCP_NODE_ID_T_IPV6; + break; + default: + return -ENOTSUP; + } + return 0; +} + int osmo_pfcp_ie_node_id_cmp(const struct osmo_pfcp_ie_node_id *a, const struct osmo_pfcp_ie_node_id *b) { if (a == b) -- To view, visit https://gerrit.osmocom.org/c/libosmo-pfcp/+/44073?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmo-pfcp Gerrit-Branch: master Gerrit-Change-Id: Ibfb53fddb618a4480d873ceb783e56c0a0e5fead Gerrit-Change-Number: 44073 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
[M] Change in libosmocore[master]: socket: Introduce API osmo_sockaddr_pton()
by pespin 13 Nov '26

13 Nov '26
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/44072?usp=email ) Change subject: socket: Introduce API osmo_sockaddr_pton() ...................................................................... socket: Introduce API osmo_sockaddr_pton() Related: SYS#7719 Change-Id: I196dc4ab58ab300e2b16daeb214278cfb9bb8226 --- M TODO-RELEASE M include/osmocom/core/socket.h M src/core/libosmocore.map M src/core/socket.c M tests/socket/socket_test.c 5 files changed, 88 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/72/44072/1 diff --git a/TODO-RELEASE b/TODO-RELEASE index 62281d3..5f1904b 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -9,3 +9,4 @@ #library what description / commit summary line vty added VTY node for libsosmo-sigtran L_CS7_QOS_CLASS_NODE vty added VTY nodes for libosmo-octoi L_OCTOI_SRV_NODE, L_OCTOI_ACCOUNT_NODE, L_OCTOI_CLNT_NODE, L_OCTOI_CLNT_ACCOUNT_NODE +core added osmo_sockaddr_pton() diff --git a/include/osmocom/core/socket.h b/include/osmocom/core/socket.h index 726e0d5..7a635f2 100644 --- a/include/osmocom/core/socket.h +++ b/include/osmocom/core/socket.h @@ -74,6 +74,7 @@ const struct sockaddr_in *sin); const char *osmo_sockaddr_ntop(const struct sockaddr *sa, char *dst); +int osmo_sockaddr_pton(const char *src, struct sockaddr *sa); uint16_t osmo_sockaddr_port(const struct sockaddr *sa); void osmo_sockaddr_set_port(struct sockaddr *sa, uint16_t port); diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map index 0cb696b..602319d 100644 --- a/src/core/libosmocore.map +++ b/src/core/libosmocore.map @@ -406,6 +406,7 @@ osmo_sockaddr_netmask_to_prefixlen; osmo_sockaddr_ntop; osmo_sockaddr_port; +osmo_sockaddr_pton; osmo_sockaddr_set_port; osmo_sockaddr_str_cmp; osmo_sockaddr_str_from_32; diff --git a/src/core/socket.c b/src/core/socket.c index 3a2d7b7..9755e06 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -1660,6 +1660,37 @@ dst, INET6_ADDRSTRLEN); } +/*! inet_pton() wrapper for a struct sockaddr. + * \param[in] src string buffer containing a potential IPv4 or IPv6 address. + * \param[out] dst destination sockaddr to store the encoded address + * \returns returns 1 on success (network address was successfully converted). + * 0 is returned if src does not contain a character string representing a + * valid IPv4 or IPv6 network address. + */ +int osmo_sockaddr_pton(const char *src, struct sockaddr *sa) +{ + struct osmo_sockaddr *osa = (struct osmo_sockaddr *)sa; + int rc; + + if (!src || !osa) + return 0; + + if (!!strchr(&src[0], ':')) { /* IPv6 */ + rc = inet_pton(AF_INET6, src, (void *)&osa->u.sin6.sin6_addr); + if (rc != 1) + return rc; + osa->u.sin6.sin6_family = AF_INET6; + return 1; + } + + /* Assume IPv4 or fail */ + rc = inet_pton(AF_INET, src, (void *)&osa->u.sin.sin_addr); + if (rc != 1) + return rc; + osa->u.sin6.sin6_family = AF_INET; + return 1; +} + /*! Get sockaddr port content (in host byte order) * \param[in] sa source sockaddr to get the port from. * \returns returns the sockaddr port in host byte order diff --git a/tests/socket/socket_test.c b/tests/socket/socket_test.c index 34130b2..ed315b3 100644 --- a/tests/socket/socket_test.c +++ b/tests/socket/socket_test.c @@ -455,6 +455,59 @@ OSMO_ASSERT(rc == 24); } +static void test_osa_pton(void) +{ + struct osmo_sockaddr osa; + struct sockaddr *sa = (struct sockaddr *)&osa; + int rc; + + rc = osmo_sockaddr_pton("0.0.0.0", sa); + OSMO_ASSERT(rc == 1); + OSMO_ASSERT(osa.u.sa.sa_family = AF_INET); + OSMO_ASSERT(osa.u.sin.sin_addr.s_addr == 0); + + rc = osmo_sockaddr_pton("255.255.255.255", sa); + OSMO_ASSERT(rc == 1); + OSMO_ASSERT(osa.u.sa.sa_family == AF_INET); + OSMO_ASSERT(osa.u.sin.sin_addr.s_addr == 0xffffffff); + + rc = osmo_sockaddr_pton("::", sa); + OSMO_ASSERT(rc == 1); + OSMO_ASSERT(osa.u.sa.sa_family == AF_INET6); + + rc = osmo_sockaddr_pton("fe::", sa); + OSMO_ASSERT(rc == 1); + OSMO_ASSERT(osa.u.sa.sa_family == AF_INET6); + + rc = osmo_sockaddr_pton("ff:ff::ff", sa); + OSMO_ASSERT(rc == 1); + OSMO_ASSERT(osa.u.sa.sa_family == AF_INET6); + + rc = osmo_sockaddr_pton("", sa); + OSMO_ASSERT(rc == 0); + + rc = osmo_sockaddr_pton(".", sa); + OSMO_ASSERT(rc == 0); + + rc = osmo_sockaddr_pton(":", sa); + OSMO_ASSERT(rc == 0); + + rc = osmo_sockaddr_pton("foobar", sa); + OSMO_ASSERT(rc == 0); + + rc = osmo_sockaddr_pton(".com", sa); + OSMO_ASSERT(rc == 0); + + rc = osmo_sockaddr_pton("foobar.com", sa); + OSMO_ASSERT(rc == 0); + + rc = osmo_sockaddr_pton(NULL, sa); + OSMO_ASSERT(rc == 0); + + rc = osmo_sockaddr_pton(NULL, NULL); + OSMO_ASSERT(rc == 0); +} + const struct log_info_cat default_categories[] = { }; @@ -478,6 +531,7 @@ test_sockinit_osa(); test_osa_str(); test_osa_netmask_prefixlen(); + test_osa_pton(); return EXIT_SUCCESS; } -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/44072?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newchange Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I196dc4ab58ab300e2b16daeb214278cfb9bb8226 Gerrit-Change-Number: 44072 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin(a)sysmocom.de>
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • ...
  • 72
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.