stream_srv: sctp: Log error cause of COMM_LOST event

RFC 6458 6.1.1:
"""
sac_error:  If the state was reached due to an error condition (e.g.,
SCTP_COMM_LOST), any relevant error information is available in
this field.  This corresponds to the protocol error codes defined
in [RFC4960].
"""
Change-Id: Ie48360d22ce1e35eefb1a305dde106948dfa80e8
This commit is contained in:
Pau Espin 2023-08-04 19:15:46 +02:00
parent 7d1430152f
commit bcfa37ade0
1 changed files with 2 additions and 1 deletions

View File

@ -856,7 +856,8 @@ static int _sctp_recvmsg_wrapper(int fd, struct msgb *msg)
LOGPC(DLINP, LOGL_DEBUG, " UP\n");
break;
case SCTP_COMM_LOST:
LOGPC(DLINP, LOGL_DEBUG, " LOST\n");
LOGPC(DLINP, LOGL_DEBUG, " COMM_LOST (err: %s)\n",
osmo_sctp_sn_error_str(notif->sn_assoc_change.sac_error));
/* Handle this like a regular disconnect */
return 0;
case SCTP_RESTART: