aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliuyacan <liuyacan@corp.netease.com>2021-06-29 16:45:11 +0800
committerFlorin Coras <florin.coras@gmail.com>2021-06-29 15:32:49 +0000
commit3871bd3a07dfc775c29ea333d10c05ced2fea80e (patch)
tree4b48cc0eff3cc042dbed6b37f09e1a9a2111238e
parentfa3884f8a1cf5493dd7733404811b63ee9c1e4d9 (diff)
tcp: add ACK flag to RST packet
According to RFC 793, the ACK control bit is always sent once the connection is established. Type: fix Signed-off-by: liuyacan <liuyacan@corp.netease.com> Change-Id: Id0fe19114a0cc468dbce4c0938b345c2ac339e73
-rw-r--r--src/vnet/tcp/tcp_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/tcp/tcp_output.c b/src/vnet/tcp/tcp_output.c
index 0ba349c2a62..5690db02ee2 100644
--- a/src/vnet/tcp/tcp_output.c
+++ b/src/vnet/tcp/tcp_output.c
@@ -766,7 +766,7 @@ tcp_send_reset (tcp_connection_t * tc)
tc->snd_opts_len = tcp_make_options (tc, &tc->snd_opts, tc->state);
tcp_hdr_opts_len = tc->snd_opts_len + sizeof (tcp_header_t);
advertise_wnd = tc->rcv_wnd >> tc->rcv_wscale;
- flags = TCP_FLAG_RST;
+ flags = TCP_FLAG_RST | TCP_FLAG_ACK;
th = vlib_buffer_push_tcp (b, tc->c_lcl_port, tc->c_rmt_port, tc->snd_nxt,
tc->rcv_nxt, tcp_hdr_opts_len, flags,
advertise_wnd);