Author: tuexen
Date: Sun Jun 28 14:11:36 2020
New Revision: 362722
URL: https://svnweb.freebsd.org/changeset/base/362722

Log:
  Don't send packets containing ERROR chunks in response to unknown
  chunks when being in a state where the verification tag to be used
  is not known yet.
  
  MFC after:            1 week

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c       Sun Jun 28 14:02:49 2020        
(r362721)
+++ head/sys/netinet/sctp_input.c       Sun Jun 28 14:11:36 2020        
(r362722)
@@ -5178,7 +5178,11 @@ process_control_chunks:
                default:
        unknown_chunk:
                        /* it's an unknown chunk! */
-                       if ((ch->chunk_type & 0x40) && (stcb != NULL)) {
+                       if ((ch->chunk_type & 0x40) &&
+                           (stcb != NULL) &&
+                           (SCTP_GET_STATE(stcb) != SCTP_STATE_EMPTY) &&
+                           (SCTP_GET_STATE(stcb) != SCTP_STATE_INUSE) &&
+                           (SCTP_GET_STATE(stcb) != SCTP_STATE_COOKIE_WAIT)) {
                                struct sctp_gen_error_cause *cause;
                                int len;
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to