From 91843cf34e9955901de89b47bf3f976b8f5855ca Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Fri, 26 Aug 2016 07:49:23 +0000 Subject: [PATCH] Fix a bug, where no SACK is sent when receiving a FORWARD-TSN or I-FORWARD-TSN chunk before any DATA or I-DATA chunk. Thanks to Julian Cordes for finding this problem and prividing packetdrill scripts to reporduce the issue. MFC after: 3 days --- sys/netinet/sctp_input.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 1525a0ad35c9..5e9a1f9f30e6 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -5515,6 +5515,11 @@ __attribute__((noinline)) *offset = length; return (NULL); } + /* + * For sending a SACK this looks like DATA + * chunks. + */ + stcb->asoc.last_data_chunk_from = stcb->asoc.last_control_chunk_from; sctp_handle_forward_tsn(stcb, (struct sctp_forward_tsn_chunk *)ch, &abort_flag, m, *offset); if (abort_flag) {