Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Oct 2010 16:46:27 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r214458 - stable/8/sys/netinet
Message-ID:  <201010281646.o9SGkRki016900@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Thu Oct 28 16:46:27 2010
New Revision: 214458
URL: http://svn.freebsd.org/changeset/base/214458

Log:
  MFC r210495:
  
  Fix a bug where the length of a FORWARD-TSN chunk was set incorrectly in
  the chunk. This resulted in malformed frames.
  Remove a duplicate assignment.

Modified:
  stable/8/sys/netinet/sctp_output.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/netinet/sctp_output.c
==============================================================================
--- stable/8/sys/netinet/sctp_output.c	Thu Oct 28 16:31:39 2010	(r214457)
+++ stable/8/sys/netinet/sctp_output.c	Thu Oct 28 16:46:27 2010	(r214458)
@@ -2281,7 +2281,6 @@ sctp_is_ifa_addr_acceptable(struct sctp_
 {
 	uint8_t dest_is_global = 0;
 
-
 	/*
 	 * Here we determine if its a acceptable address. A acceptable
 	 * address means it is the same scope or higher scope but we can
@@ -9813,7 +9812,8 @@ sctp_fill_in_rest:
 			 * peer ack point
 			 */
 			advance_peer_ack_point = last->rec.data.TSN_seq;
-			space_needed -= (cnt_of_skipped * sizeof(struct sctp_strseq));
+			space_needed = sizeof(struct sctp_forward_tsn_chunk) +
+			    cnt_of_skipped * sizeof(struct sctp_strseq);
 		}
 		chk->send_size = space_needed;
 		/* Setup the chunk */
@@ -9822,8 +9822,6 @@ sctp_fill_in_rest:
 		fwdtsn->ch.chunk_flags = 0;
 		fwdtsn->ch.chunk_type = SCTP_FORWARD_CUM_TSN;
 		fwdtsn->new_cumulative_tsn = htonl(advance_peer_ack_point);
-		chk->send_size = (sizeof(struct sctp_forward_tsn_chunk) +
-		    (cnt_of_skipped * sizeof(struct sctp_strseq)));
 		SCTP_BUF_LEN(chk->data) = chk->send_size;
 		fwdtsn++;
 		/*-



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