svn commit: r195770 - stable/7/sys/netinet

Bruce M Simpson bms at FreeBSD.org
Sun Jul 19 18:36:55 UTC 2009


Author: bms
Date: Sun Jul 19 18:36:54 2009
New Revision: 195770
URL: http://svn.freebsd.org/changeset/base/195770

Log:
  Fix two typos in sctp_send_initiate(); these corrupt the INIT chunk on
  64-bit platforms, in the 7.x SCTP stack.
  
  Observed on 7.2-STABLE/amd64.
  
  Submitted by:   Michael Tuexen
  Reviewed by:    rrs

Modified:
  stable/7/sys/netinet/sctp_output.c

Modified: stable/7/sys/netinet/sctp_output.c
==============================================================================
--- stable/7/sys/netinet/sctp_output.c	Sun Jul 19 17:40:45 2009	(r195769)
+++ stable/7/sys/netinet/sctp_output.c	Sun Jul 19 18:36:54 2009	(r195770)
@@ -6087,7 +6087,7 @@ sctp_send_initiate(struct sctp_inpcb *in
 		ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m));
 		ph->param_type = htons(SCTP_HAS_NAT_SUPPORT);
 		ph->param_length = htons(sizeof(struct sctp_paramhdr));
-		SCTP_BUF_LEN(m) += sizeof(sizeof(struct sctp_paramhdr));
+		SCTP_BUF_LEN(m) += sizeof(struct sctp_paramhdr);
 	}
 	/* add authentication parameters */
 	if (!SCTP_BASE_SYSCTL(sctp_auth_disable)) {
@@ -7198,7 +7198,7 @@ do_a_abort:
 		ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m));
 		ph->param_type = htons(SCTP_HAS_NAT_SUPPORT);
 		ph->param_length = htons(sizeof(struct sctp_paramhdr));
-		SCTP_BUF_LEN(m) += sizeof(sizeof(struct sctp_paramhdr));
+		SCTP_BUF_LEN(m) += sizeof(struct sctp_paramhdr);
 	}
 	/* And now tell the peer we do all the extensions */
 	pr_supported = (struct sctp_supported_chunk_types_param *)(mtod(m, caddr_t)+SCTP_BUF_LEN(m));


More information about the svn-src-stable-7 mailing list