pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/29543 )
Change subject: stream: Set sctp_ppid and sctp_stream when sctp notifciation is received ......................................................................
stream: Set sctp_ppid and sctp_stream when sctp notifciation is received
Let's set these values in all cases.
Change-Id: I99f6098d8d9fc1c06bc28373bf7ee76f15d5f525 --- M src/stream.c 1 file changed, 2 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified neels: Looks good to me, but someone else must approve laforge: Looks good to me, approved
diff --git a/src/stream.c b/src/stream.c index 383103c..604955b 100644 --- a/src/stream.c +++ b/src/stream.c @@ -1474,6 +1474,8 @@ ret = sctp_recvmsg(fd, msgb_data(msg), msgb_tailroom(msg), NULL, NULL, &sinfo, &flags); msgb_sctp_msg_flags(msg) = 0; + msgb_sctp_ppid(msg) = ntohl(sinfo.sinfo_ppid); + msgb_sctp_stream(msg) = sinfo.sinfo_stream; 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); @@ -1514,8 +1516,6 @@ } return -EAGAIN; } - msgb_sctp_ppid(msg) = ntohl(sinfo.sinfo_ppid); - msgb_sctp_stream(msg) = sinfo.sinfo_stream; return ret; } #endif