case XDP_TCP_CLOSING2:
if (msg->payload.iov_len == 0) { // otherwise ignore close
tcp_table_remove(pconn, tcp_table);
- del_conn(conn);
- relay->conn = NULL;
+ relay->answer = XDP_TCP_FREE;
}
break;
}
if (conn != NULL && msg->seqno == conn->seqno) {
relay->action = XDP_TCP_RESET;
tcp_table_remove(pconn, tcp_table);
- del_conn(conn);
- relay->conn = NULL;
+ relay->answer = XDP_TCP_FREE;
} else if (conn != NULL) {
relay->auto_answer = KNOT_XDP_MSG_ACK;
}
inline static bool knot_tcp_relay_empty(const knot_tcp_relay_t *r)
{
- return r->action == XDP_TCP_NOOP && r->auto_answer == 0 && r->inbufs_count == 0;
+ return r->action == XDP_TCP_NOOP && r->answer == XDP_TCP_NOOP && r->auto_answer == 0 && r->inbufs_count == 0;
}
/*!
check_sent(0, 0, 0, 0);
is_int(conns_pre - 1, test_table->usage, "close: connection removed");
is_int(conns_pre - 1, tcp_table_timeout_length(test_table), "close: timeout list size");
+ knot_tcp_cleanup(test_table, &rl, 1);
}
void test_many(void)