Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #971 #972

Merged
merged 1 commit into from
Mar 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tempesta_fw/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,12 @@ tfw_http_conn_msg_free(TfwHttpMsg *hm)
return;

if (hm->conn) {
/*
* Check that the paired response has been destroyed before
* the request.
*/
WARN_ON_ONCE((TFW_CONN_TYPE(hm->conn) & Conn_Clnt) && hm->pair);

/*
* Unlink the connection while there is at least one
* reference. Use atomic exchange to avoid races with
Expand Down Expand Up @@ -1088,6 +1094,7 @@ tfw_http_req_fwd_send(TfwSrvConn *srv_conn, TfwServer *srv,
__func__, srv_conn, req);
if (req->flags & TFW_HTTP_F_HMONITOR) {
__http_req_delist(srv_conn, req);
WARN_ON_ONCE(req->pair);
tfw_http_msg_free((TfwHttpMsg *)req);
TFW_WARN_ADDR("Unable to send health"
" monitoring request to server",
Expand Down
3 changes: 0 additions & 3 deletions tempesta_fw/http_msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,6 @@ tfw_http_msg_free(TfwHttpMsg *m)
if (!m)
return;

/* Check that the paired response was destroyed before request. */
WARN_ON_ONCE(m->conn && (TFW_CONN_TYPE(m->conn) & Conn_Clnt) && m->pair);

tfw_http_msg_unpair(m);
ss_skb_queue_purge(&m->msg.skb_list);

Expand Down