From owner-svn-src-stable@FreeBSD.ORG Thu Oct 28 19:13:47 2010 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35DF51065670; Thu, 28 Oct 2010 19:13:47 +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 08C258FC12; Thu, 28 Oct 2010 19:13:47 +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 o9SJDk9A026255; Thu, 28 Oct 2010 19:13:46 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9SJDkHc026251; Thu, 28 Oct 2010 19:13:46 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201010281913.o9SJDkHc026251@svn.freebsd.org> From: Michael Tuexen Date: Thu, 28 Oct 2010 19:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214485 - stable/8/sys/netinet X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 19:13:47 -0000 Author: tuexen Date: Thu Oct 28 19:13:46 2010 New Revision: 214485 URL: http://svn.freebsd.org/changeset/base/214485 Log: MFC r212801: Fix a bug where the wrong PR-SCTP policy was considered. While there, use always the same code for the check of TTL expiration. Modified: stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_timer.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_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Thu Oct 28 19:12:05 2010 (r214484) +++ stable/8/sys/netinet/sctp_indata.c Thu Oct 28 19:13:46 2010 (r214485) @@ -3300,13 +3300,7 @@ sctp_strike_gap_ack_chunks(struct sctp_t if (stcb->asoc.peer_supports_prsctp) { if ((PR_SCTP_TTL_ENABLED(tp1->flags)) && tp1->sent < SCTP_DATAGRAM_ACKED) { /* Is it expired? */ - if ( - /* - * TODO sctp_constants.h needs alternative - * time macros when _KERNEL is undefined. - */ - (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) - ) { + if (timevalcmp(&now, &tp1->rec.data.timetodrop, >)) { /* Yes so drop it */ if (tp1->data != NULL) { (void)sctp_release_pr_sctp_chunk(stcb, tp1, Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Thu Oct 28 19:12:05 2010 (r214484) +++ stable/8/sys/netinet/sctp_output.c Thu Oct 28 19:13:46 2010 (r214485) @@ -5728,7 +5728,7 @@ sctp_prune_prsctp(struct sctp_tcb *stcb, while (chk) { nchk = TAILQ_NEXT(chk, sctp_next); /* Here we must move to the sent queue and mark */ - if (PR_SCTP_TTL_ENABLED(chk->flags)) { + if (PR_SCTP_BUF_ENABLED(chk->flags)) { if (chk->rec.data.timetodrop.tv_sec >= (long)srcv->sinfo_timetolive) { if (chk->data) { /* Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Thu Oct 28 19:12:05 2010 (r214484) +++ stable/8/sys/netinet/sctp_timer.c Thu Oct 28 19:13:46 2010 (r214485) @@ -772,9 +772,7 @@ start_again: } if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) { /* Is it expired? */ - if ((now.tv_sec > chk->rec.data.timetodrop.tv_sec) || - ((chk->rec.data.timetodrop.tv_sec == now.tv_sec) && - (now.tv_usec > chk->rec.data.timetodrop.tv_usec))) { + if (timevalcmp(&now, &chk->rec.data.timetodrop, >)) { /* Yes so drop it */ if (chk->data) { (void)sctp_release_pr_sctp_chunk(stcb,