From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41061) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gNTlY-0000a0-Sf for qemu-devel@nongnu.org; Thu, 15 Nov 2018 21:21:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gNTlV-0001B2-O4 for qemu-devel@nongnu.org; Thu, 15 Nov 2018 21:21:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47676) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gNTlU-0001Ah-Vm for qemu-devel@nongnu.org; Thu, 15 Nov 2018 21:21:49 -0500 References: <20181031005015.5433-1-zhangckid@gmail.com> <159ef9c8-e0b2-6183-b33c-6925fb6574dc@redhat.com> From: Jason Wang Message-ID: <409b9337-a9ef-5206-ecde-f3317b62e263@redhat.com> Date: Fri, 16 Nov 2018 10:21:42 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH V2] net/filter-rewriter.c: Fix coverity static analysis issue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Zhang Chen , QEMU Developers , Zhang Chen On 2018/11/15 =E4=B8=8B=E5=8D=886:32, Peter Maydell wrote: > On 2 November 2018 at 02:21, Jason Wang wrote: >> On 2018/10/31 =E4=B8=8A=E5=8D=888:50, Zhang Chen wrote: >>> The original code just follow the TCP state diagram, >>> but in this case, we can skip the TCPS_TIME_WAIT state to simplify >>> the implementation. >>> >>> Signed-off-by: Zhang Chen >>> --- >>> net/filter-rewriter.c | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c >>> index bb8f4d93b1..2e26839bc2 100644 >>> --- a/net/filter-rewriter.c >>> +++ b/net/filter-rewriter.c >>> @@ -155,12 +155,13 @@ static int handle_primary_tcp_pkt(RewriterState= *rf, >>> * Active close step 2. >>> */ >>> if (conn->tcp_state =3D=3D TCPS_FIN_WAIT_1) { >>> - conn->tcp_state =3D TCPS_TIME_WAIT; >>> /* >>> * For simplify implementation, we needn't wait 2MSL t= ime >>> * in filter rewriter. Because guest kernel will track= the >>> * TCP status and wait 2MSL time, if client resend the= FIN >>> * packet, guest will apply the last ACK too. >>> + * So, we skip the TCPS_TIME_WAIT state here and go stra= ight >>> + * to TCPS_CLOSED state. >>> */ >>> conn->tcp_state =3D TCPS_CLOSED; >>> g_hash_table_remove(rf->connection_track_table, key); >> >> >> Applied. > Ping -- this doesn't seem to have made it into master? > > thanks > -- PMM > Will send a pull request soon. Thanks