pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
stream: Erase sctp_msg_flags if receiving user data

It could be that the user reuses the msgb passed to
osmo_stream_srv_recv() all the time, hence we need to reset the flags,
otherwise it may end up being set forever.

Change-Id: Id358140db82b018e3973111e530834589c0b7224
---
M src/stream.c
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/stream.c b/src/stream.c
index 31aecc4..78238b6 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -1473,6 +1473,7 @@

ret = sctp_recvmsg(fd, msgb_data(msg), msgb_tailroom(msg),
NULL, NULL, &sinfo, &flags);
+ msgb_sctp_msg_flags(msg) = 0;
if (flags & MSG_NOTIFICATION) {
union sctp_notification *notif = (union sctp_notification *)msgb_data(msg);
LOGP(DLINP, LOGL_DEBUG, "NOTIFICATION %u flags=0x%x\n", notif->sn_header.sn_type, notif->sn_header.sn_flags);

To view, visit change 29541. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Change-Id: Id358140db82b018e3973111e530834589c0b7224
Gerrit-Change-Number: 29541
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-CC: neels <nhofmeyr@sysmocom.de>
Gerrit-MessageType: merged