Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/40275?usp=email
to look at the new patch set (#4).
Change subject: Support tearing down PFCP upon PS-RAB-ASS-REQ (REL)
......................................................................
Support tearing down PFCP upon PS-RAB-ASS-REQ (REL)
Before this patch, RAB Assign Request containing only a ReleaseList
where being discarded with an error.
This commit adds logic to allow passing those messages, and upon RAB
Assign Response, tear down the related PFCP sessions before forwarding
it back to the CN.
This is scenario is tested in TTCN-3 testsuite
HNBGW_Tests.TC_ps_rab_release.
Related: SYS#7451
Change-Id: Iea7f2cea4aa1fbab12cb8bf0275cd43d9e0713c2
---
M include/osmocom/hnbgw/ps_rab_ass_fsm.h
M include/osmocom/hnbgw/ps_rab_fsm.h
M src/osmo-hnbgw/ps_rab_ass_fsm.c
M src/osmo-hnbgw/ps_rab_fsm.c
4 files changed, 141 insertions(+), 66 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/75/40275/4
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40275?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Iea7f2cea4aa1fbab12cb8bf0275cd43d9e0713c2
Gerrit-Change-Number: 40275
Gerrit-PatchSet: 4
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40275?usp=email )
Change subject: Support tearing down PFCP upon PS-RAB-ASS-REQ (REL)
......................................................................
Set Ready For Review
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40275?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: Iea7f2cea4aa1fbab12cb8bf0275cd43d9e0713c2
Gerrit-Change-Number: 40275
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 09 May 2025 18:24:29 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40272?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: hnbgw: Introduce tests TC_ps_rab_release(_abnormal)
......................................................................
hnbgw: Introduce tests TC_ps_rab_release(_abnormal)
Same as their existing CS counterparts TC_rab_release(_abnormal).
Related: SYS#7451
Change-Id: Ia25efc2d6bf01d4a13e7fd1ce0563d20dd2e321e
---
M hnbgw/HNBGW_Tests.ttcn
M hnbgw/expected-results.xml
M library/ranap/RANAP_Templates.ttcn
3 files changed, 152 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/72/40272/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/40272?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: Ia25efc2d6bf01d4a13e7fd1ce0563d20dd2e321e
Gerrit-Change-Number: 40272
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40276?usp=email )
Change subject: ps_rab_ass_fsm: Fix potential use-after-free if Tx RAB-ASS-RESP over SCCP fails
......................................................................
ps_rab_ass_fsm: Fix potential use-after-free if Tx RAB-ASS-RESP over SCCP fails
ps_rab_ass_failure() is already calling
osmo_fsm_inst_term(rab_ass->fi(), which will free "fi" and its child
talloc struct "rab_ass".
Hence, return early as done everywher else in order to avoid accessing
the struct again.
Change-Id: Id605f2b279a4d886399de27f6a94622ad7bf982b
---
M src/osmo-hnbgw/ps_rab_ass_fsm.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/76/40276/1
diff --git a/src/osmo-hnbgw/ps_rab_ass_fsm.c b/src/osmo-hnbgw/ps_rab_ass_fsm.c
index fc3b605..fc15fff 100644
--- a/src/osmo-hnbgw/ps_rab_ass_fsm.c
+++ b/src/osmo-hnbgw/ps_rab_ass_fsm.c
@@ -633,8 +633,8 @@
if (rc < 0) {
LOG_PS_RAB_ASS(rab_ass, LOGL_ERROR, "Sending RANAP PS RAB-AssignmentResponse failed\n");
ps_rab_ass_failure(rab_ass);
+ return;
}
-
/* The request message has been forwarded. We are done. */
osmo_fsm_inst_term(rab_ass->fi, OSMO_FSM_TERM_REGULAR, NULL);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40276?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: Id605f2b279a4d886399de27f6a94622ad7bf982b
Gerrit-Change-Number: 40276
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40274?usp=email )
Change subject: Clean up calls to ps_rab_ass_fsm_state_chg()
......................................................................
Clean up calls to ps_rab_ass_fsm_state_chg()
Change-Id: I7c9a67ebe192ba30fa474f84eaee1db2a718fa35
---
M src/osmo-hnbgw/ps_rab_ass_fsm.c
1 file changed, 3 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/74/40274/1
diff --git a/src/osmo-hnbgw/ps_rab_ass_fsm.c b/src/osmo-hnbgw/ps_rab_ass_fsm.c
index f76b1cf..68bf58a 100644
--- a/src/osmo-hnbgw/ps_rab_ass_fsm.c
+++ b/src/osmo-hnbgw/ps_rab_ass_fsm.c
@@ -118,7 +118,7 @@
/* PS_RAB_ASS_ST_WAIT_RABS_ESTABLISHED is terminated by PFCP timeouts via ps_rab_fsm */
};
-#define ps_rab_ass_fsm_state_chg(state) \
+#define ps_rab_ass_fsm_state_chg(fi, state) \
osmo_tdef_fsm_inst_state_chg(fi, state, ps_rab_ass_fsm_timeouts, hnbgw_T_defs, -1)
static struct osmo_fsm ps_rab_ass_fsm;
@@ -219,12 +219,9 @@
{
RANAP_RAB_AssignmentRequestIEs_t *ies = &message->msg.raB_AssignmentRequestIEs;
int i;
-
struct ps_rab_ass *rab_ass;
- struct osmo_fsm_inst *fi;
rab_ass = ps_rab_ass_alloc(map);
-
talloc_steal(rab_ass, message);
rab_ass->ranap_rab_ass_req_message = message;
/* Now rab_ass owns message and will clean it up */
@@ -258,8 +255,7 @@
/* Got all RABs' state and their Core side GTP info in map->ps_rab_list. For each, a ps_rab_fsm has been started and
* each will call back with PS_RAB_ASS_EV_LOCAL_F_TEIDS_RX or PS_RAB_ASS_EV_RAB_FAIL. */
- fi = rab_ass->fi;
- return ps_rab_ass_fsm_state_chg(PS_RAB_ASS_ST_WAIT_LOCAL_F_TEIDS);
+ return ps_rab_ass_fsm_state_chg(rab_ass->fi, PS_RAB_ASS_ST_WAIT_LOCAL_F_TEIDS);
no_rab:
ps_rab_ass_failure(rab_ass);
@@ -416,7 +412,6 @@
int rc;
int i;
struct ps_rab_ass *rab_ass;
- struct osmo_fsm_inst *fi;
RANAP_RAB_AssignmentResponseIEs_t *ies;
/* Make sure we indeed deal with a setup-or-modify list */
@@ -472,8 +467,7 @@
/* Got all RABs' state and updated their Access side GTP info in map->ps_rab_list. For each RAB ID, the matching
* ps_rab_fsm has been instructed to tell the UPF about the Access Remote GTP F-TEID. Each will call back with
* PS_RAB_ASS_EV_RAB_ESTABLISHED or PS_RAB_ASS_EV_RAB_FAIL. */
- fi = rab_ass->fi;
- return ps_rab_ass_fsm_state_chg(PS_RAB_ASS_ST_WAIT_RABS_ESTABLISHED);
+ return ps_rab_ass_fsm_state_chg(rab_ass->fi, PS_RAB_ASS_ST_WAIT_RABS_ESTABLISHED);
}
static void ps_rab_ass_resp_send_if_ready(struct ps_rab_ass *rab_ass);
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40274?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: I7c9a67ebe192ba30fa474f84eaee1db2a718fa35
Gerrit-Change-Number: 40274
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/40273?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: context_map: Rename ps_rab(_ass) to denote it is a list
......................................................................
context_map: Rename ps_rab(_ass) to denote it is a list
This allows also easily grepping to figure out where it is used,
otherwise it was named like the struct, fsm, etc.
Change-Id: I6ac029e6a820a031a443dae8c83e44f6ae9fb5fa
---
M include/osmocom/hnbgw/context_map.h
M src/osmo-hnbgw/context_map.c
M src/osmo-hnbgw/ps_rab_ass_fsm.c
M src/osmo-hnbgw/ps_rab_fsm.c
4 files changed, 20 insertions(+), 20 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/73/40273/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40273?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I6ac029e6a820a031a443dae8c83e44f6ae9fb5fa
Gerrit-Change-Number: 40273
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-hnbgw/+/40273?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: context_map: Rename ps_rab(_ass) to denote it is a list
......................................................................
context_map: Rename ps_rab(_ass) to denote it is a list
This allows also easily grepping to figure out where it is used,
otherwise it was named like the struct, fsm, etc.
Change-Id: I6ac029e6a820a031a443dae8c83e44f6ae9fb5fa
---
M include/osmocom/hnbgw/context_map.h
M src/osmo-hnbgw/context_map.c
M src/osmo-hnbgw/ps_rab_ass_fsm.c
M src/osmo-hnbgw/ps_rab_fsm.c
4 files changed, 16 insertions(+), 16 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/73/40273/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40273?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: osmo-hnbgw
Gerrit-Branch: master
Gerrit-Change-Id: I6ac029e6a820a031a443dae8c83e44f6ae9fb5fa
Gerrit-Change-Number: 40273
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-hnbgw/+/40273?usp=email )
Change subject: context_map: Rename ps_rab(_ass) to denote it is a list
......................................................................
context_map: Rename ps_rab(_ass) to denote it is a list
This allows also easily grepping to figure out where it is used,
otherwise it was named like the struct, fsm, etc.
Change-Id: I6ac029e6a820a031a443dae8c83e44f6ae9fb5fa
---
M include/osmocom/hnbgw/context_map.h
M src/osmo-hnbgw/context_map.c
M src/osmo-hnbgw/ps_rab_ass_fsm.c
M src/osmo-hnbgw/ps_rab_fsm.c
4 files changed, 15 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-hnbgw refs/changes/73/40273/1
diff --git a/include/osmocom/hnbgw/context_map.h b/include/osmocom/hnbgw/context_map.h
index a885f5b..f4b8b85 100644
--- a/include/osmocom/hnbgw/context_map.h
+++ b/include/osmocom/hnbgw/context_map.h
@@ -204,11 +204,11 @@
* appearing in a PS RAB Assignment message have completed their PFCP setup, we can replace the GTP info for the
* RAB IDs and forward the RAB Assignment Request to HNB / the RAB Assignment Response to CN.
*/
- struct llist_head ps_rab_ass;
+ struct llist_head ps_rab_ass_list;
/* All PS RABs and their GTP tunnel mappings. list of struct ps_rab. Each ps_rab FSM handles the PFCP
* communication for one particular RAB ID. */
- struct llist_head ps_rabs;
+ struct llist_head ps_rab_list;
/* RAB state tracking. As RAB-ID is an 8-bit integer, we need 256 elements in the array */
uint8_t rab_state[256];
diff --git a/src/osmo-hnbgw/context_map.c b/src/osmo-hnbgw/context_map.c
index cc68ec6..a70905c 100644
--- a/src/osmo-hnbgw/context_map.c
+++ b/src/osmo-hnbgw/context_map.c
@@ -88,8 +88,8 @@
map->hnb_ctx = hnb;
map->rua_ctx_id = rua_ctx_id;
map->is_ps = is_ps;
- INIT_LLIST_HEAD(&map->ps_rab_ass);
- INIT_LLIST_HEAD(&map->ps_rabs);
+ INIT_LLIST_HEAD(&map->ps_rab_ass_list);
+ INIT_LLIST_HEAD(&map->ps_rab_list);
map_rua_fsm_alloc(map);
diff --git a/src/osmo-hnbgw/ps_rab_ass_fsm.c b/src/osmo-hnbgw/ps_rab_ass_fsm.c
index f5025a2..ec4adf0 100644
--- a/src/osmo-hnbgw/ps_rab_ass_fsm.c
+++ b/src/osmo-hnbgw/ps_rab_ass_fsm.c
@@ -140,7 +140,7 @@
};
fi->priv = rab_ass;
- llist_add_tail(&rab_ass->entry, &map->ps_rab_ass);
+ llist_add_tail(&rab_ass->entry, &map->ps_rab_ass_list);
return rab_ass;
}
@@ -256,7 +256,7 @@
goto no_rab;
}
- /* Got all RABs' state and their Core side GTP info in map->ps_rabs. For each, a ps_rab_fsm has been started and
+ /* Got all RABs' state and their Core side GTP info in map->ps_rab_list. For each, a ps_rab_fsm has been started and
* each will call back with PS_RAB_ASS_EV_LOCAL_F_TEIDS_RX or PS_RAB_ASS_EV_RAB_FAIL. */
fi = rab_ass->fi;
return ps_rab_ass_fsm_state_chg(PS_RAB_ASS_ST_WAIT_LOCAL_F_TEIDS);
@@ -469,7 +469,7 @@
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_RANAP_RAB_SetupOrModifiedItem, &item_ies);
}
- /* Got all RABs' state and updated their Access side GTP info in map->ps_rabs. For each RAB ID, the matching
+ /* Got all RABs' state and updated their Access side GTP info in map->ps_rab_list. For each RAB ID, the matching
* ps_rab_fsm has been instructed to tell the UPF about the Access Remote GTP F-TEID. Each will call back with
* PS_RAB_ASS_EV_RAB_ESTABLISHED or PS_RAB_ASS_EV_RAB_FAIL. */
fi = rab_ass->fi;
@@ -618,14 +618,14 @@
struct ps_rab_ass *rab_ass = fi->priv;
struct ps_rab *rab;
- llist_for_each_entry(rab, &rab_ass->map->ps_rabs, entry) {
+ llist_for_each_entry(rab, &rab_ass->map->ps_rab_list, entry) {
if (rab->req_fi == fi)
rab->req_fi = NULL;
if (rab->resp_fi == fi)
rab->resp_fi = NULL;
}
- /* remove from map->ps_rab_ass */
+ /* remove from map->ps_rab_ass_list */
llist_del(&rab_ass->entry);
}
@@ -633,10 +633,10 @@
{
struct ps_rab_ass *rab_ass, *next;
struct ps_rab *rab, *next2;
- llist_for_each_entry_safe(rab, next2, &map->ps_rabs, entry) {
+ llist_for_each_entry_safe(rab, next2, &map->ps_rab_list, entry) {
ps_rab_release(rab);
}
- llist_for_each_entry_safe(rab_ass, next, &map->ps_rab_ass, entry) {
+ llist_for_each_entry_safe(rab_ass, next, &map->ps_rab_ass_list, entry) {
osmo_fsm_inst_term(rab_ass->fi, OSMO_FSM_TERM_REGULAR, NULL);
}
}
diff --git a/src/osmo-hnbgw/ps_rab_fsm.c b/src/osmo-hnbgw/ps_rab_fsm.c
index f6d113d..6c9c429 100644
--- a/src/osmo-hnbgw/ps_rab_fsm.c
+++ b/src/osmo-hnbgw/ps_rab_fsm.c
@@ -107,7 +107,7 @@
OSMO_ASSERT(osmo_use_count_get_put(&rab->use_count, PS_RAB_USE_ACTIVE, 1) == 0);
- llist_add_tail(&rab->entry, &map->ps_rabs);
+ llist_add_tail(&rab->entry, &map->ps_rab_list);
return rab;
}
@@ -121,7 +121,7 @@
struct hnbgw_context_map *map;
llist_for_each_entry(map, &hnb->map_list, hnb_list) {
struct ps_rab *rab;
- llist_for_each_entry(rab, &map->ps_rabs, entry) {
+ llist_for_each_entry(rab, &map->ps_rab_list, entry) {
uint64_t rab_seid = is_cp_seid ? rab->cp_seid : rab->up_f_seid.seid;
if (rab_seid == seid)
return rab;
@@ -154,7 +154,7 @@
struct ps_rab *ps_rab_get(struct hnbgw_context_map *map, uint8_t rab_id)
{
struct ps_rab *rab;
- llist_for_each_entry(rab, &map->ps_rabs, entry) {
+ llist_for_each_entry(rab, &map->ps_rab_list, entry) {
if (rab->rab_id != rab_id)
continue;
return rab;
@@ -692,7 +692,7 @@
static void ps_rab_forget_map(struct ps_rab *rab)
{
- /* remove from map->ps_rabs */
+ /* remove from map->ps_rab_list */
if (rab->map)
llist_del(&rab->entry);
rab->map = NULL;
--
To view, visit https://gerrit.osmocom.org/c/osmo-hnbgw/+/40273?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: I6ac029e6a820a031a443dae8c83e44f6ae9fb5fa
Gerrit-Change-Number: 40273
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>