Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jul 2009 18:36:54 +0000 (UTC)
From:      Bruce M Simpson <bms@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r195770 - stable/7/sys/netinet
Message-ID:  <200907191836.n6JIasO8050942@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907191836.n6JIasO8050942>