From owner-svn-src-all@freebsd.org Wed Apr 22 00:16:43 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 255092BF38E; Wed, 22 Apr 2020 00:16:43 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 496LZz0GKPz4QPD; Wed, 22 Apr 2020 00:16:43 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 026049D8D; Wed, 22 Apr 2020 00:16:43 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03M0Gg6U077393; Wed, 22 Apr 2020 00:16:42 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03M0GgEm077388; Wed, 22 Apr 2020 00:16:42 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202004220016.03M0GgEm077388@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 22 Apr 2020 00:16:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r360180 - in head/sys/netinet: . tcp_stacks X-SVN-Group: head X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: in head/sys/netinet: . tcp_stacks X-SVN-Commit-Revision: 360180 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Wed, 22 Apr 2020 00:16:43 -0000 Author: rscheff Date: Wed Apr 22 00:16:42 2020 New Revision: 360180 URL: https://svnweb.freebsd.org/changeset/base/360180 Log: revert rS360143 - Correctly set up initial cwnd due to syzkaller panics found Reported by: tuexen Approved by: tuexen (mentor) Sponsored by: NetApp, Inc. Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_stacks/bbr.c head/sys/netinet/tcp_stacks/rack.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Tue Apr 21 23:38:54 2020 (r360179) +++ head/sys/netinet/tcp_input.c Wed Apr 22 00:16:42 2020 (r360180) @@ -2374,6 +2374,12 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) { tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; + + /* + * Account for the ACK of our SYN prior to + * regular ACK processing below. + */ + tp->snd_una++; } if (tp->t_flags & TF_NEEDFIN) { tcp_state_change(tp, TCPS_FIN_WAIT_1); @@ -2393,12 +2399,6 @@ tcp_do_segment(struct mbuf *m, struct tcphdr *th, stru cc_conn_init(tp); tcp_timer_activate(tp, TT_KEEP, TP_KEEPIDLE(tp)); } - if (SEQ_GT(th->th_ack, tp->snd_una)) - /* - * Account for the ACK of our SYN prior to - * regular ACK processing below. - */ - tp->snd_una++; /* * If segment contains data or ACK, will call tcp_reass() * later; if not, do so now to pass queued data to user. Modified: head/sys/netinet/tcp_stacks/bbr.c ============================================================================== --- head/sys/netinet/tcp_stacks/bbr.c Tue Apr 21 23:38:54 2020 (r360179) +++ head/sys/netinet/tcp_stacks/bbr.c Wed Apr 22 00:16:42 2020 (r360180) @@ -9325,6 +9325,11 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, str tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; + /* + * Account for the ACK of our SYN prior to regular + * ACK processing below. + */ + tp->snd_una++; } /* * Make transitions: SYN-RECEIVED -> ESTABLISHED SYN-RECEIVED* -> @@ -9347,12 +9352,6 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, str if (!IS_FASTOPEN(tp->t_flags)) cc_conn_init(tp); } - if (SEQ_GT(th->th_ack, tp->snd_una)) - /* - * Account for the ACK of our SYN prior to - * regular ACK processing below. - */ - tp->snd_una++; /* * If segment contains data or ACK, will call tcp_reass() later; if * not, do so now to pass queued data to user. Modified: head/sys/netinet/tcp_stacks/rack.c ============================================================================== --- head/sys/netinet/tcp_stacks/rack.c Tue Apr 21 23:38:54 2020 (r360179) +++ head/sys/netinet/tcp_stacks/rack.c Wed Apr 22 00:16:42 2020 (r360180) @@ -6539,6 +6539,12 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, st if (IS_FASTOPEN(tp->t_flags) && tp->t_tfo_pending) { tcp_fastopen_decrement_counter(tp->t_tfo_pending); tp->t_tfo_pending = NULL; + + /* + * Account for the ACK of our SYN prior to + * regular ACK processing below. + */ + tp->snd_una++; } if (tp->t_flags & TF_NEEDFIN) { tcp_state_change(tp, TCPS_FIN_WAIT_1); @@ -6556,12 +6562,6 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, st if (!IS_FASTOPEN(tp->t_flags)) cc_conn_init(tp); } - if (SEQ_GT(th->th_ack, tp->snd_una)) - /* - * Account for the ACK of our SYN prior to - * regular ACK processing below. - */ - tp->snd_una++; /* * If segment contains data or ACK, will call tcp_reass() later; if * not, do so now to pass queued data to user.