tcp: don't respond to RST packets

This commit is contained in:
Avi Kivity
2014-09-11 17:37:34 +03:00
parent b68aa3080e
commit cbcfbf86ca

View File

@@ -277,6 +277,9 @@ void tcp<InetTraits>::tcb::respond_with_reset(tcp_hdr* rth) {
template <typename InetTraits>
void tcp<InetTraits>::respond_with_reset(tcp_hdr* rth, ipaddr local_ip, ipaddr foreign_ip) {
if (rth->f_rst) {
return;
}
packet p;
auto th = p.prepend_header<tcp_hdr>();
th->src_port = rth->dst_port;