qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Zhang Chen <zhangckid@gmail.com>,
	qemu-devel@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Cc: Zhang Chen <chen.zhang@intel.com>
Subject: Re: [Qemu-devel] [PATCH V2] net/filter-rewriter.c: Fix coverity static analysis issue
Date: Fri, 2 Nov 2018 10:21:57 +0800	[thread overview]
Message-ID: <159ef9c8-e0b2-6183-b33c-6925fb6574dc@redhat.com> (raw)
In-Reply-To: <20181031005015.5433-1-zhangckid@gmail.com>


On 2018/10/31 上午8: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 <zhangckid@gmail.com>
> ---
>   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 == TCPS_FIN_WAIT_1) {
> -            conn->tcp_state = TCPS_TIME_WAIT;
>               /*
>                * For simplify implementation, we needn't wait 2MSL time
>                * 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 straight
> +             * to TCPS_CLOSED state.
>                */
>               conn->tcp_state = TCPS_CLOSED;
>               g_hash_table_remove(rf->connection_track_table, key);


Applied.

Thanks

  reply	other threads:[~2018-11-02  2:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31  0:50 [Qemu-devel] [PATCH V2] net/filter-rewriter.c: Fix coverity static analysis issue Zhang Chen
2018-11-02  2:21 ` Jason Wang [this message]
2018-11-15 10:32   ` Peter Maydell
2018-11-16  2:21     ` Jason Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=159ef9c8-e0b2-6183-b33c-6925fb6574dc@redhat.com \
    --to=jasowang@redhat.com \
    --cc=chen.zhang@intel.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhangckid@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).