[OpenSIPS-Devel] [OpenSIPS/opensips] f2f805: tcp: add primitives to check cons local lists

Razvan Crainea razvan at opensips.org
Thu Feb 9 03:38:58 EST 2017


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: f2f805157204365637759fc774478237e6ae8ed8
      https://github.com/OpenSIPS/opensips/commit/f2f805157204365637759fc774478237e6ae8ed8
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2017-02-09 (Thu, 09 Feb 2017)

  Changed paths:
    M net/net_tcp_proc.c
    M net/tcp_conn.h

  Log Message:
  -----------
  tcp: add primitives to check cons local lists


  Commit: 33fe3395570c40b6733b0579f94072b68e7bd646
      https://github.com/OpenSIPS/opensips/commit/33fe3395570c40b6733b0579f94072b68e7bd646
  Author: Razvan Crainea <razvan at opensips.org>
  Date:   2017-02-09 (Thu, 09 Feb 2017)

  Changed paths:
    M net/net_tcp.c
    M net/net_tcp_proc.c
    M net/tcp_conn.h

  Log Message:
  -----------
  tcp: don't add conn in TCP main reactor after async write

When getting back a TCP connection from a TCP worker after it wrote some
async chunks, we should not add the connection in the reactor for read.
The reason is that the connection might already be polled by a different
process. If the poll triggers for read in the main reactor, the
connection will be assigned to a new process - and we end up having a
connection for read in two different processes reactor - this breaks
connections list and results in double frees and invalid memory access.

Many thanks to Federico Edorna for all the help given to track down this
issue!


Compare: https://github.com/OpenSIPS/opensips/compare/d71eb87453fd...33fe3395570c


More information about the Devel mailing list