mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
sctp: handle ootb packet in chunk order as defined
Changed the order of processing SHUTDOWN ACK and COOKIE ACK refer to section 8.4:Handle "Out of the Blue" Packets. SHUTDOWN ACK chunk should be processed before processing "Stale Cookie" ERROR or a COOKIE ACK. Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com> Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
deb85a6ecc
commit
85c5ed4e44
2 changed files with 21 additions and 15 deletions
|
@ -661,7 +661,6 @@ static int sctp_rcv_ootb(struct sk_buff *skb)
|
|||
{
|
||||
sctp_chunkhdr_t *ch;
|
||||
__u8 *ch_end;
|
||||
sctp_errhdr_t *err;
|
||||
|
||||
ch = (sctp_chunkhdr_t *) skb->data;
|
||||
|
||||
|
@ -697,20 +696,6 @@ static int sctp_rcv_ootb(struct sk_buff *skb)
|
|||
if (SCTP_CID_INIT == ch->type && (void *)ch != skb->data)
|
||||
goto discard;
|
||||
|
||||
/* RFC 8.4, 7) If the packet contains a "Stale cookie" ERROR
|
||||
* or a COOKIE ACK the SCTP Packet should be silently
|
||||
* discarded.
|
||||
*/
|
||||
if (SCTP_CID_COOKIE_ACK == ch->type)
|
||||
goto discard;
|
||||
|
||||
if (SCTP_CID_ERROR == ch->type) {
|
||||
sctp_walk_errors(err, ch) {
|
||||
if (SCTP_ERROR_STALE_COOKIE == err->cause)
|
||||
goto discard;
|
||||
}
|
||||
}
|
||||
|
||||
ch = (sctp_chunkhdr_t *) ch_end;
|
||||
} while (ch_end < skb_tail_pointer(skb));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue