Fix handling of sctp SCTP_SHUTDOWN_EVENT notification

SCTP_SHUTDOWN_EVENT is a first class event, and not a subtype of
SCTP_ASSOC_CHANGE (such as SCTP_SHUTDOWN_COMP).

Related: SYS#6113
Change-Id: I7fa648142c07f63c55091d2a15b9d7312bcd4cec
This commit is contained in:
Pau Espin 2022-09-30 14:40:02 +02:00
parent 12bc4afab3
commit 1906a30ca9
1 changed files with 7 additions and 7 deletions

View File

@ -262,15 +262,15 @@ static int hnb_read_cb(struct osmo_stream_srv *conn)
LOGHNB(hnb, DMAIN, LOGL_NOTICE, "HNB SCTP conn RESTARTed, marking as HNBAP-unregistered\n");
hnb->hnb_registered = false;
break;
case SCTP_SHUTDOWN_EVENT:
LOGHNB(hnb, DMAIN, LOGL_NOTICE,
"sctp_recvmsg(%s) = SCTP_SHUTDOWN_EVENT, closing conn\n",
osmo_sock_get_name2(osmo_stream_srv_get_ofd(conn)->fd));
osmo_stream_srv_destroy(conn);
rc = -1;
break;
}
break;
case SCTP_SHUTDOWN_EVENT:
LOGHNB(hnb, DMAIN, LOGL_NOTICE,
"sctp_recvmsg(%s) = SCTP_SHUTDOWN_EVENT, closing conn\n",
osmo_sock_get_name2(osmo_stream_srv_get_ofd(conn)->fd));
osmo_stream_srv_destroy(conn);
rc = -1;
break;
}
goto out;
} else if (rc == -EAGAIN) {