[OpenSIPS-Devel] [OpenSIPS/opensips] f2666c: Fix tracing race condition on SSL based connects

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Jul 4 10:13:58 EDT 2017


  Branch: refs/heads/2.3
  Home:   https://github.com/OpenSIPS/opensips
  Commit: f2666cbc3eb3155283aa57b019d482e0c5cea4e8
      https://github.com/OpenSIPS/opensips/commit/f2666cbc3eb3155283aa57b019d482e0c5cea4e8
  Author: Bogdan-Andrei Iancu <bogdan at opensips.org>
  Date:   2017-07-04 (Tue, 04 Jul 2017)

  Changed paths:
    M modules/proto_tls/proto_tls.c
    M modules/proto_wss/proto_wss.c

  Log Message:
  -----------
  Fix tracing race condition on SSL based connects

When performing a connects (required by a write op) for a SSL enabled connection, the returning handshake make lead to a concurent read on the same connection.
And the read op will try to dump the traced data aquired by the write (connect) op -> different processes, different memory chuncks
To avoid such probles, the "connect" tracing will be flushed on write (a connect is always trigger by a write need) and the "accept" tracing will be flushed only on read (an accept is always followed by a read).

(cherry picked from commit 059545765e34dc8016c278a3e4800a33929bd117)




More information about the Devel mailing list