[S] Change in libosmo-netif[master]: Do not reconnect when receiving SCTP notification

2024-04-23 Thread jolly
jolly has abandoned this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email )

Change subject: Do not reconnect when receiving SCTP notification
..


Abandoned

Improved patches are provided by pespin and merged.
--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
Gerrit-Change-Number: 36568
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: abandon


[S] Change in libosmo-netif[master]: Do not reconnect when receiving SCTP notification

2024-04-16 Thread pespin
Attention is currently required from: jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email )

Change subject: Do not reconnect when receiving SCTP notification
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
https://osmocom.org/issues/6405#note-15



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
Gerrit-Change-Number: 36568
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Apr 2024 15:41:23 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: Do not reconnect when receiving SCTP notification

2024-04-16 Thread pespin
Attention is currently required from: jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email )

Change subject: Do not reconnect when receiving SCTP notification
..


Patch Set 1:

(1 comment)

Patchset:

PS1:
stream_sctp_recvmsg_trailer() in path should be printing more information about 
the event you are receiving, it should contain "NOTIFICATION" in the string.
 it should be loglevel INFO/NOTICE/ERROR depending on event.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
Gerrit-Change-Number: 36568
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Apr 2024 14:35:50 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: Do not reconnect when receiving SCTP notification

2024-04-16 Thread pespin
Attention is currently required from: jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email )

Change subject: Do not reconnect when receiving SCTP notification
..


Patch Set 1: Code-Review-2

(1 comment)

File src/stream_cli.c:

https://gerrit.osmocom.org/c/libosmo-netif/+/36568/comment/7b0deb09_8508b6ce
PS1, Line 500:  if (res == -EAGAIN) {
> Wait, that's wrong though, you are basically preventing stream_cli users to 
> get SCTP notifications,  […]
You should be handling case "if (msgb_sctp_msg_flags(msg) & 
OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION)" inside stream_cli_handle_connecting() 
imho, based on event you'll want to reconnect().
At least handle it inside switch case here in line 507.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
Gerrit-Change-Number: 36568
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Apr 2024 14:34:57 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: Do not reconnect when receiving SCTP notification

2024-04-16 Thread pespin
Attention is currently required from: jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email )

Change subject: Do not reconnect when receiving SCTP notification
..


Patch Set 1: Code-Review-1

(1 comment)

File src/stream_cli.c:

https://gerrit.osmocom.org/c/libosmo-netif/+/36568/comment/7c8db9c7_c61f745f
PS1, Line 500:  if (res == -EAGAIN) {
> The res = -EAGAIN is more like "historical reasons" imho (I wrote further 
> support there afterwards), […]
Wait, that's wrong though, you are basically preventing stream_cli users to get 
SCTP notifications, which is wrong. osmo_ss7_asp.c expects to get those.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
Gerrit-Change-Number: 36568
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Apr 2024 14:17:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin 
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: Do not reconnect when receiving SCTP notification

2024-04-16 Thread pespin
Attention is currently required from: jolly.

pespin has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email )

Change subject: Do not reconnect when receiving SCTP notification
..


Patch Set 1:

(1 comment)

File src/stream_cli.c:

https://gerrit.osmocom.org/c/libosmo-netif/+/36568/comment/137e8852_3488b14f
PS1, Line 500:  if (res == -EAGAIN) {
The res = -EAGAIN is more like "historical reasons" imho (I wrote further 
support there afterwards), you should better check the flags (set in 
stream_sctp_recvmsg_trailer()):

if (msgb_sctp_msg_flags(msg) & OSMO_STREAM_SCTP_MSG_FLAGS_NOTIFICATION)

See for instance: libosmo-sccp/src/osmo_ss7_asp.c:824 or line 998.



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
Gerrit-Change-Number: 36568
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Apr 2024 14:17:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: Do not reconnect when receiving SCTP notification

2024-04-16 Thread fixeria
Attention is currently required from: jolly.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email )

Change subject: Do not reconnect when receiving SCTP notification
..


Patch Set 1: Verified+1 Code-Review+1

(1 comment)

Patchset:

PS1:
Fixes the problem for me!



--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
Gerrit-Change-Number: 36568
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Attention: jolly 
Gerrit-Comment-Date: Tue, 16 Apr 2024 13:47:51 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[S] Change in libosmo-netif[master]: Do not reconnect when receiving SCTP notification

2024-04-16 Thread jolly
jolly has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email )


Change subject: Do not reconnect when receiving SCTP notification
..

Do not reconnect when receiving SCTP notification

If a notification is detected by stream_sctp_recvmsg_trailer(), it
returns -EAGAIN. This is not an error that should cause the stream
client to trigger a reconnect. It must drop that message, as it is
done at the stream server.

In both cases the unhandled msg must be freed.

Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
---
M src/stream_cli.c
M src/stream_srv.c
2 files changed, 23 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/68/36568/1

diff --git a/src/stream_cli.c b/src/stream_cli.c
index 11c88ae..aeac78e 100644
--- a/src/stream_cli.c
+++ b/src/stream_cli.c
@@ -497,6 +497,10 @@
struct osmo_stream_cli *cli  = osmo_iofd_get_data(iofd);

res = stream_iofd_sctp_recvmsg_trailer(iofd, msg, res, msgh);
+   if (res == -EAGAIN) {
+   msgb_free(msg);
+   return;
+   }

switch (cli->state) {
case STREAM_CLI_STATE_CONNECTING:
diff --git a/src/stream_srv.c b/src/stream_srv.c
index a02c1c2..994015b 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -658,8 +658,10 @@
LOGSSRV(conn, LOGL_DEBUG, "message received (res=%d)\n", res);

res = stream_iofd_sctp_recvmsg_trailer(iofd, msg, res, msgh);
-   if (res == -EAGAIN)
+   if (res == -EAGAIN) {
+   msgb_free(msg);
return;
+   }

if (OSMO_UNLIKELY(res <= 0)) {
/* This connection is dead, destroy it. */

--
To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/36568?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Ic588e6d8a3eecde701778f7d6ff5599ab81eff2b
Gerrit-Change-Number: 36568
Gerrit-PatchSet: 1
Gerrit-Owner: jolly 
Gerrit-MessageType: newchange