You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB

  1. From af9b52e92be8ca6a07f9156dcb0b08dd2ad8db75 Mon Sep 17 00:00:00 2001
  2. From: Christopher Faulet <cfaulet@haproxy.com>
  3. Date: Thu, 20 Jul 2017 11:05:10 +0200
  4. Subject: [PATCH 15/18] BUG/MAJOR: http: Fix possible infinity loop in
  5. http_sync_(req|res)_state
  6. In commit "MINOR: http: Switch requests/responses in TUNNEL mode only by
  7. checking txn flags", it is possible to have an infinite loop on HTTP_MSG_CLOSING
  8. state.
  9. (cherry picked from commit 56d260916f61e48c8b2f1fd2f9431afac776d160)
  10. Signed-off-by: William Lallemand <wlallemand@haproxy.org>
  11. ---
  12. src/proto_http.c | 4 ++--
  13. 1 file changed, 2 insertions(+), 2 deletions(-)
  14. diff --git a/src/proto_http.c b/src/proto_http.c
  15. index e776e4d5..4a030013 100644
  16. --- a/src/proto_http.c
  17. +++ b/src/proto_http.c
  18. @@ -5394,8 +5394,8 @@ int http_sync_req_state(struct stream *s)
  19. else if (chn->flags & CF_SHUTW) {
  20. txn->req.err_state = txn->req.msg_state;
  21. txn->req.msg_state = HTTP_MSG_ERROR;
  22. - goto wait_other_side;
  23. }
  24. + goto wait_other_side;
  25. }
  26. if (txn->req.msg_state == HTTP_MSG_CLOSED) {
  27. @@ -5523,8 +5523,8 @@ int http_sync_res_state(struct stream *s)
  28. s->be->be_counters.cli_aborts++;
  29. if (objt_server(s->target))
  30. objt_server(s->target)->counters.cli_aborts++;
  31. - goto wait_other_side;
  32. }
  33. + goto wait_other_side;
  34. }
  35. if (txn->rsp.msg_state == HTTP_MSG_CLOSED) {
  36. --
  37. 2.13.0