Branch: refs/heads/3.2
  Home:   https://github.com/OpenSIPS/opensips
  Commit: ba938f9d76b277e0cb9f4cf27f7ea46bd89ca917
      
https://github.com/OpenSIPS/opensips/commit/ba938f9d76b277e0cb9f4cf27f7ea46bd89ca917
  Author: Bogdan-Andrei Iancu <[email protected]>
  Date:   2022-10-27 (Thu, 27 Oct 2022)

  Changed paths:
    M modules/tracer/tracer.c

  Log Message:
  -----------
  [tracer] avoid parsing the shm cloned SIP msg

The TM TMCB_MSG_SENT_OUT callback may be called when doing a retransmission for 
a locally generated request. If for the original sending, a pkg malloc'ed 
sip_msg is passed to TMCB_MSG_SENT_OUT callback, for the retransmissions the 
shm cloned sip_msg is passed. As the 'tracer' callback (on TMCB_MSG_SENT_OUT) 
requires some FROM hdr parsing (to get the from tag), it should NOT parse 
directly on the shm cloned SIP msg as it will tain the shm sip_msg with pkg 
pointers -> better do a local parsing (not attached to the sip_msg) of the FROM 
HDR.
This issue was leading to pkg leaking (of the parsed FROM hdr in the shm cloned 
sip_msg) or it a crash if using failure route from the local route.

Note: this is specific to using tracer module from the local route.
Closes  #2728

(cherry picked from commit 4eabea8a9eb0a08909854722972cd35164557c76)



_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

Reply via email to