[OpenSIPS-Devel] [OpenSIPS/opensips] cc2683: b2b_entities: properly handle BYE while another re...

Vlad Pătrașcu noreply at github.com
Mon Feb 6 08:49:53 UTC 2023


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: cc2683fbcf3302920453c2c9aaa977ef59781ad2
      https://github.com/OpenSIPS/opensips/commit/cc2683fbcf3302920453c2c9aaa977ef59781ad2
  Author: Vlad Patrascu <vladp at opensips.org>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M modules/b2b_entities/b2be_load.h
    M modules/b2b_entities/dlg.c
    M modules/b2b_logic/logic.c
    M modules/b2b_logic/records.h

  Log Message:
  -----------
  b2b_entities: properly handle BYE while another request is pending

Instead of rejecting the BYE with 491, first complete the transactions on the
UAS side with 200 OK for the BYE and 487 for the other pending transaction.
Also, mark the tuple for deletion at b2b_logic level and send a BYE to
the peer entity after completing any UAC transcations on this side.

Credits to David Escartin from Sonoc for reporting.

(cherry picked from commit da6975f065ad848ceb8d8f65b0f09d1efc2bca37)


  Commit: 1d3448cb73c10fcd59fd3eed218f47b17fd03864
      https://github.com/OpenSIPS/opensips/commit/1d3448cb73c10fcd59fd3eed218f47b17fd03864
  Author: Vlad Patrascu <vladp at opensips.org>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M modules/b2b_entities/dlg.c

  Log Message:
  -----------
  b2b_entities: fix crashes after running the script request route

After releasing the lock and running the script request route, check
if the dialog has not been deleted in the meantime.

Credits to David Escartin from Sonoc for reporting.

(cherry picked from commit 65a8da41f58ba3179c62c83a2d710651c97b36ca)


  Commit: 5b1d464ab3b6a53a086db883ac244082d534c9fe
      https://github.com/OpenSIPS/opensips/commit/5b1d464ab3b6a53a086db883ac244082d534c9fe
  Author: Vlad Patrascu <vladp at opensips.org>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M modules/b2b_logic/logic.c

  Log Message:
  -----------
  b2b_logic: fix crashes due to dangling tuple pointer

Make sure to not access a tuple that might have been freed while not
holding the lock.

Many thanks to David Escartin from Sonoc for the help in troubleshooting
this issue!

(cherry picked from commit 1225b0191afdf0a36e14bf47f5cac908e5af5603)


  Commit: cea7b88d50f6c98883c8d3bc93e69293a5979f4a
      https://github.com/OpenSIPS/opensips/commit/cea7b88d50f6c98883c8d3bc93e69293a5979f4a
  Author: Vlad Patrascu <vladp at opensips.org>
  Date:   2023-02-06 (Mon, 06 Feb 2023)

  Changed paths:
    M Makefile
    M Makefile.conf.template
    M cfg.lex
    M cfg.y
    M globals.c
    M globals.h
    M lib/dbg/struct_hist.c
    M lib/dbg/struct_hist.h
    M main.c
    M mem/common.h
    M mem/f_malloc.c
    M mem/f_malloc.h
    M mem/hp_malloc.c
    M mem/hp_malloc.h
    M mem/mem.c
    M mem/mem.h
    M mem/q_malloc.c
    M mem/q_malloc.h
    M mem/shm_mem.c
    M mem/shm_mem.h
    A mem/shm_mem_dbg.h
    M modules/dialog/dlg_hash.c
    M modules/proto_tls/proto_tls.c
    M modules/siprec/siprec_sess.h
    M net/net_tcp.c
    M net/net_tcp.h
    M net/net_tcp_dbg.h
    M net/net_tcp_proc.c
    M net/proto_tcp/proto_tcp.c
    M shutdown.c

  Log Message:
  -----------
  Add support for in-memory logging of shm operations

This is enabled via the new 'shm_memlog_size' global parameter which
configures the maximum number of operations to keep in the history.
A separate memory block, dedicated for this shm debug info will be
allocated. A single 'struct struct_hist' type object will be added to the
list for each alloc/free operation.


Compare: https://github.com/OpenSIPS/opensips/compare/7a46b455e274...cea7b88d50f6



More information about the Devel mailing list