pespin has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/41303?usp=email )
Change subject: aaa_diameter_swx: Avoid answering RTR with Success if already deregistering
......................................................................
aaa_diameter_swx: Avoid answering RTR with Success if already deregistering
When receiving an SWx RTR on our osmo-epdg (epdg+AAA), we initiate the
deregistration against peer nodes on other interfaces and answer with SWx RTA.
If a subsequent RTR for the subscriber arrives on the interface while
the deregistration is in progress, we'd answer with RTA Result-Code 2001
SUCCESS. Let's instead answer already as if we didn't know about the
subscriber, since it will end up being freed in a short span of time and
nothing can be done about it.
Related: OS#6796
Change-Id: I0ed13e9503ec380ce4331c662ca3eb966ccbda92
---
M src/aaa_diameter_swx_cb.erl
M src/aaa_ue_fsm.erl
2 files changed, 21 insertions(+), 9 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
diff --git a/src/aaa_diameter_swx_cb.erl b/src/aaa_diameter_swx_cb.erl
index 3ae11f0..f8ebd08 100644
--- a/src/aaa_diameter_swx_cb.erl
+++ b/src/aaa_diameter_swx_cb.erl
@@ -149,14 +149,26 @@
case DeregReason of
#'Deregistration-Reason'{'Reason-Code' = ?'REASON-CODE_PERMANENT_TERMINATION'} ->
case aaa_ue_fsm:ev_rx_swx_rtr(Pid) of
- {error, _} -> aaa_ue_fsm:stop(Pid);
- _ -> ok
+ {error, dereg_in_progress} ->
+ Res = [],
+ %% TS 29.229 6.2.2.1 DIAMETER_ERROR_USER_UNKNOWN
+ ERes = #'Experimental-Result'{'Vendor-Id' = ?VENDOR_ID_3GPP,
+ 'Experimental-Result-Code' = 5001};
+ {error, _} ->
+ aaa_ue_fsm:stop(Pid), % unknown error, make sure we tear down.
+ Res = [],
+ %% TS 29.229 6.2.2.1 DIAMETER_ERROR_USER_UNKNOWN
+ ERes = #'Experimental-Result'{'Vendor-Id' = ?VENDOR_ID_3GPP,
+ 'Experimental-Result-Code' = 5001};
+ _ ->
+ Res = 2001, %% Success
+ ERes = []
end;
_ ->
- aaa_ue_fsm:stop(Pid)
- end,
- Res = 2001, %% Success
- ERes = [];
+ aaa_ue_fsm:stop(Pid),
+ Res = 2001, %% Success
+ ERes = []
+ end;
undefined ->
Res = [],
%% TS 29.229 6.2.2.1 DIAMETER_ERROR_USER_UNKNOWN
diff --git a/src/aaa_ue_fsm.erl b/src/aaa_ue_fsm.erl
index 97ad67f..91830d9 100644
--- a/src/aaa_ue_fsm.erl
+++ b/src/aaa_ue_fsm.erl
@@ -451,7 +451,7 @@
state_authenticated_wait_swx_saa({call, From}, rx_swx_rtr, Data) ->
lager:info("ue_fsm state_authenticated_wait_swx_saa event=rx_swx_rtr ~p~n", [Data]),
%% We are already tearing down in an ordered manner, accept and do nothing.
- {keep_state, Data, [{reply,From,ok}]}.
+ {keep_state, Data, [{reply,From,{error,dereg_in_progress}}]}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% state_dereg_net_initiated_wait_s6b_asa:
@@ -469,7 +469,7 @@
state_dereg_net_initiated_wait_s6b_asa({call, From}, rx_swx_rtr, Data) ->
lager:info("ue_fsm state_dereg_net_initiated_wait_s6b_asa event=rx_swx_rtr ~p~n", [Data]),
%% We are already tearing down in an ordered manner, accept and do nothing.
- {keep_state, Data, [{reply,From,ok}]};
+ {keep_state, Data, [{reply,From,{error,dereg_in_progress}}]};
state_dereg_net_initiated_wait_s6b_asa({call, From}, Ev, Data) ->
lager:notice("ue_fsm state_dereg_net_initiated_wait_s6b_asa: Unexpected call event ~p, ~p~n", [Ev, Data]),
@@ -494,7 +494,7 @@
state_dereg_net_initiated_wait_swm_asa({call, From}, rx_swx_rtr, Data) ->
lager:info("ue_fsm state_dereg_net_initiated_wait_swm_asa event=rx_swx_rtr ~p~n", [Data]),
%% We are already tearing down in an ordered manner, accept and do nothing.
- {keep_state, Data, [{reply,From,ok}]};
+ {keep_state, Data, [{reply,From,{error,dereg_in_progress}}]};
state_dereg_net_initiated_wait_swm_asa({call, From}, Ev, Data) ->
lager:notice("ue_fsm state_dereg_net_initiated_wait_swm_asa: Unexpected call event ~p, ~p~n", [Ev, Data]),
--
To view, visit https://gerrit.osmocom.org/c/erlang/osmo-epdg/+/41303?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: erlang/osmo-epdg
Gerrit-Branch: master
Gerrit-Change-Id: I0ed13e9503ec380ce4331c662ca3eb966ccbda92
Gerrit-Change-Number: 41303
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/41352?usp=email )
The change is no longer submittable: Code-Review is unsatisfied now.
Change subject: ipa: fix a minor memleak when receiving invalid IPA CCM messages
......................................................................
Patch Set 1: Code-Review-2
(1 comment)
Patchset:
PS1:
Blockign for now due to concerns of this maybe causing major problems in the older code, which doesn't have other fixes/rewrites like dfccd989dbffe418d9ab7b4d3087345636da762d.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-sigtran/+/41352?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: osmith/2.1.3
Gerrit-Change-Id: I1b828c16350d10398810e60acbb35663f215c63f
Gerrit-Change-Number: 41352
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 06 Nov 2025 13:51:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: fixeria, pespin.
osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/libosmocore/+/41356?usp=email )
Change subject: Bump version: 1.11.2.2-f5e98-dirty → 1.11.3
......................................................................
Patch Set 2:
(1 comment)
Patchset:
PS2:
As discussed, added @pespin@sysmocom.de's patch https://gerrit.osmocom.org/c/libosmocore/+/41365/1. This is a backport of a patch merged to master today, so let's wait another day with the patch release until ttcn3 testsuites ran against it and there is no fallout from it.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41356?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: osmith/1.11.3
Gerrit-Change-Id: I8bec5917f1de938775401a1030cdd29b5700873e
Gerrit-Change-Number: 41356
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 06 Nov 2025 13:39:14 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/41365?usp=email )
Change subject: io_uring: Avoid extra reads if iofd becomes unregistered by user
......................................................................
io_uring: Avoid extra reads if iofd becomes unregistered by user
The user callback (read_cb, segmentation_cb, etc.) may decide to
unregister the iofd instead of closing it. In this scenario, we should
avoid calling the callback further until the iofd is registered again.
This is a backport of master branch commit
32efc324ce0b30280effef4860bb15588ecb1010.
Change-Id: I514412ecfbb82d32cb3d9c2272795ebac42f55e9
---
M src/core/osmo_io_uring.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/65/41365/1
diff --git a/src/core/osmo_io_uring.c b/src/core/osmo_io_uring.c
index b8b240f..cfd72fd 100644
--- a/src/core/osmo_io_uring.c
+++ b/src/core/osmo_io_uring.c
@@ -189,10 +189,10 @@
if (rc > 0)
msgb_put(msg, rc);
- if (!IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED))
iofd_handle_recv(iofd, msg, rc, msghdr);
- if (iofd->u.uring.read_enabled && !IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))
+ if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_FD_REGISTERED) && iofd->u.uring.read_enabled)
iofd_uring_submit_recv(iofd, msghdr->action);
else
iofd->u.uring.read_msghdr = NULL;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41365?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: osmith/1.11.3
Gerrit-Change-Id: I514412ecfbb82d32cb3d9c2272795ebac42f55e9
Gerrit-Change-Number: 41365
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Attention is currently required from: fixeria, osmith, pespin.
Hello Jenkins Builder, fixeria, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41356?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Code-Review+1 by fixeria, Verified+1 by Jenkins Builder
Change subject: Bump version: 1.11.2.2-f5e98-dirty → 1.11.3
......................................................................
Bump version: 1.11.2.2-f5e98-dirty → 1.11.3
Change-Id: I8bec5917f1de938775401a1030cdd29b5700873e
---
M debian/changelog
M src/core/Makefile.am
M src/gsm/Makefile.am
3 files changed, 12 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/56/41356/2
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41356?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: osmith/1.11.3
Gerrit-Change-Id: I8bec5917f1de938775401a1030cdd29b5700873e
Gerrit-Change-Number: 41356
Gerrit-PatchSet: 2
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>