From owner-svn-src-all@FreeBSD.ORG Thu Dec 30 16:23:14 2010 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 67EBC106566B; Thu, 30 Dec 2010 16:23:14 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CCC08FC12; Thu, 30 Dec 2010 16:23:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBUGNED2044454; Thu, 30 Dec 2010 16:23:14 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBUGNE66044450; Thu, 30 Dec 2010 16:23:14 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201012301623.oBUGNE66044450@svn.freebsd.org> From: Michael Tuexen Date: Thu, 30 Dec 2010 16:23:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216821 - head/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: Thu, 30 Dec 2010 16:23:14 -0000 Author: tuexen Date: Thu Dec 30 16:23:13 2010 New Revision: 216821 URL: http://svn.freebsd.org/changeset/base/216821 Log: Fix three bugs related to the sequence number wrap-around affecting the processing of ECNE and ASCONF chunks. Reviewed by: rrs MFC after: 3 days. Modified: head/sys/netinet/sctp_asconf.c head/sys/netinet/sctp_input.c head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Thu Dec 30 15:58:23 2010 (r216820) +++ head/sys/netinet/sctp_asconf.c Thu Dec 30 16:23:13 2010 (r216821) @@ -632,7 +632,7 @@ sctp_handle_asconf(struct mbuf *m, unsig asoc = &stcb->asoc; serial_num = ntohl(cp->serial_number); - if (compare_with_wrap(asoc->asconf_seq_in, serial_num, MAX_SEQ) || + if (compare_with_wrap(asoc->asconf_seq_in, serial_num, MAX_TSN) || serial_num == asoc->asconf_seq_in) { /* got a duplicate ASCONF */ SCTPDBG(SCTP_DEBUG_ASCONF1, Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Thu Dec 30 15:58:23 2010 (r216820) +++ head/sys/netinet/sctp_input.c Thu Dec 30 16:23:13 2010 (r216821) @@ -2944,7 +2944,7 @@ sctp_handle_ecn_echo(struct sctp_ecne_ch net = lchk->whoTo; break; } - if (compare_with_wrap(lchk->rec.data.TSN_seq, tsn, MAX_SEQ)) + if (compare_with_wrap(lchk->rec.data.TSN_seq, tsn, MAX_TSN)) break; lchk = TAILQ_NEXT(lchk, sctp_next); } Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Thu Dec 30 15:58:23 2010 (r216820) +++ head/sys/netinet/sctp_output.c Thu Dec 30 16:23:13 2010 (r216821) @@ -6477,7 +6477,7 @@ sctp_toss_old_asconf(struct sctp_tcb *st if (chk->rec.chunk_id.id == SCTP_ASCONF) { if (chk->data) { acp = mtod(chk->data, struct sctp_asconf_chunk *); - if (compare_with_wrap(ntohl(acp->serial_number), stcb->asoc.asconf_seq_out_acked, MAX_SEQ)) { + if (compare_with_wrap(ntohl(acp->serial_number), stcb->asoc.asconf_seq_out_acked, MAX_TSN)) { /* Not Acked yet */ break; }