aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-11-16 10:01:04 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-11-16 10:01:04 +0000
commit6ea4161e6451c8a99a3d8c197362e2113e7a5f6c (patch)
tree04465bb84b3c08ac15ecccdbdd3d94655613fe43
parentd835c6192495dc5b2c3a15a0761eb57d8d310828 (diff)
parent013a62020a92f371555c67342424f2f944b62be4 (diff)
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Fri 16 Nov 2018 03:38:58 GMT # gpg: using RSA key EF04965B398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasowang/tags/net-pull-request: net/filter-rewriter.c: Fix coverity static analysis issue Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--net/filter-rewriter.c3
1 files changed, 2 insertions, 1 deletions
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);