sua: Reject DATA messages on SCTP stream 0
RFC3868 states clearly that DATA messages MUST be sent o a stream other than stream '0'. So at the receiver side, we should validate that (just like we do in M3UA. Change-Id: I0784e221ef791557a69be04f7d246de059ea84c8
This commit is contained in:
parent
8b282e954a
commit
a04c47acae
|
@ -630,15 +630,22 @@ int sua_rx_msg(struct osmo_ss7_asp *asp, struct msgb *msg)
|
|||
goto out;
|
||||
}
|
||||
|
||||
/* TODO: check for SCTP Strema ID */
|
||||
/* TODO: check if any AS configured in ASP */
|
||||
/* TODO: check for valid routing context */
|
||||
|
||||
switch (xua->hdr.msg_class) {
|
||||
case SUA_MSGC_CL:
|
||||
if (msgb_sctp_stream(msg) == 0) {
|
||||
rc = SUA_ERR_INVAL_STREAM_ID;
|
||||
break;
|
||||
}
|
||||
rc = sua_rx_cl(asp, xua);
|
||||
break;
|
||||
case SUA_MSGC_CO:
|
||||
if (msgb_sctp_stream(msg) == 0) {
|
||||
rc = SUA_ERR_INVAL_STREAM_ID;
|
||||
break;
|
||||
}
|
||||
rc = sua_rx_co(asp, xua);
|
||||
break;
|
||||
case SUA_MSGC_ASPSM:
|
||||
|
|
Loading…
Reference in New Issue