svn commit: r252718 - head/sys/netinet

Michael Tuexen tuexen at FreeBSD.org
Thu Jul 4 19:47:46 UTC 2013


Author: tuexen
Date: Thu Jul  4 19:47:46 2013
New Revision: 252718
URL: http://svnweb.freebsd.org/changeset/base/252718

Log:
  When processing an incoming ABORT, SHUTDOWN_COMPLETE or ERROR (NAT related)
  chunk, take always the T-bit into account, when checking the verification
  tag.
  
  MFC after: 3 days

Modified:
  head/sys/netinet/sctp_input.c

Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c	Thu Jul  4 19:45:34 2013	(r252717)
+++ head/sys/netinet/sctp_input.c	Thu Jul  4 19:47:46 2013	(r252718)
@@ -4568,8 +4568,10 @@ __attribute__((noinline))
 		if ((ch->chunk_type == SCTP_ABORT_ASSOCIATION) ||
 		    (ch->chunk_type == SCTP_SHUTDOWN_COMPLETE) ||
 		    (ch->chunk_type == SCTP_PACKET_DROPPED)) {
-			if ((vtag_in == asoc->my_vtag) ||
-			    ((ch->chunk_flags & SCTP_HAD_NO_TCB) &&
+			/* Take the T-bit always into account. */
+			if ((((ch->chunk_flags & SCTP_HAD_NO_TCB) == 0) &&
+			    (vtag_in == asoc->my_vtag)) ||
+			    (((ch->chunk_flags & SCTP_HAD_NO_TCB) == SCTP_HAD_NO_TCB) &&
 			    (vtag_in == asoc->peer_vtag))) {
 				/* this is valid */
 			} else {


More information about the svn-src-head mailing list