From owner-svn-src-all@FreeBSD.ORG Sun Jul 19 18:36:55 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 133471065686; Sun, 19 Jul 2009 18:36:55 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 010AA8FC08; Sun, 19 Jul 2009 18:36:55 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n6JIas1b050944; Sun, 19 Jul 2009 18:36:54 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6JIasO8050942; Sun, 19 Jul 2009 18:36:54 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907191836.n6JIasO8050942@svn.freebsd.org> From: Bruce M Simpson Date: Sun, 19 Jul 2009 18:36:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195770 - stable/7/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Jul 2009 18:36:55 -0000 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));