Skip to content

Conversation

@benceszigeti
Copy link
Collaborator

No description provided.

bogdan-iancu and others added 30 commits July 10, 2024 09:41
Setting the tracing info into the processing context here is useless as none of the following funcions are using /accessing this context.
Even more, there are cases (like tracing an UAC b2b transaction triggered by a b2b timeout) where there is not processing context set (so crashing).

(cherry picked from commit 759d08f)
With some DBaaS, the TLS connections only require a CA setting on the
client side -- no need to explicitly set the "cert=" or "private_key=",
as they might not even be available.

(cherry picked from commit 616ddd6)
The number of successful legs should be reset after completing the
initial setup, so that if sequential legs are being rejected, we should
not assume they are successful.

Many thanks to Eric Tamme (@etamme) for reporting the issue and
for providing testing scenarios.

(cherry picked from commit fd37fa5)
Since this key is stored in a non-base64 format, when the hash is being
iterated, this value breaks the convesion - and when trying to
`base64_decode("cdb_test_val")`, this results in a larger value than the
expected integer, resulting in a stack crash.

Removing the key from the hash fixes this crash, as all keys remain are
properly base64 encoded. Moreover, if the key is not properly encoded,
we should make sure that its decode does not overwrite the stack frame.

(cherry picked from commit dc38cf3)
During F_TCPCONN handling by a TCP worker, the @con pointer must *not*
be de-referenced if the READ was successful and connection already
returned to TCP Main.  This patch adds a new retcode to the tcp.read API
function in order to achieve this.

Credits to Yury Kirsanov and Bogdan Iancu for helping troubleshoot
this issue!

(cherry picked from commit 6108ee2)
* reduce logline buffer from 100 -> 80
* only keep the last 300 events per connection (down from 2000)
* avoid auto-logging (flushing) of all TCP conn histories to syslog

These changes should reduce the default TCP conn debugging footprint
from ~2GB to ~0.3GB of shared memory, as well as clean up the logs.

(cherry picked from commit e496cfc)
While walking the list and collecting expired subscriptions, it is
incorrect to temporarily release, then re-acquire the lock and still
make use of the @s or @prev_s pointers afterwards, as the list may have
changed in the meantime!

The fix is to detach and collect any expired subs, then walk & handle
them in a separate iteration.

(cherry picked from commit b8e0250)
ignore the internal flags during the test

(cherry picked from commit 5e11c80)
On del operation, if an index (in the fd_array) is provided, check its consistency, to avoid corrupting the reactor's data.
Upon corruption, do a backtrace and force recovery by resetting the index to -1

IMPORTANT: this is not a fix, but a detection and recovery, hoping to help identifing bad ops over the reactor's fds.
(cherry picked from commit c15bd04)
…corruption

Use a basic/simple array to store logs to be eventually dump later if a corruption of the reactor data is detected after an io_wait_del() operation.
This is debugging only, with the intention of helping the troubleshooting some ongoing investigations.

(cherry picked from commit a28e500)
* add @idx check against upper bounds of h->fd_array (avoid overflow)
* recover @idx even when it's out-of-bounds (e.g. idx == -10)
* simplify backtrace call

(cherry picked from commit 46e2085)
(cherry picked from commit ea1f23e)
This fixes compile on older compilers i.e. Redhat 7

(cherry picked from commit 07a0c05)
Commit aaa6b68 mitigated the effects of a poor HEP connection
affecting the OpenSIPS's responsiveness by delaying the reply callbacks
until after the hop-by-hop ACK is sent out.  However, a side-effect in
doing so is that the reply/ACK HEP packets on un-established calls
became swapped.  This patch aims to address the issue.

Related to OpenSIPS#3255

(cherry picked from commit 43477da)
This patch fixes a destroy() issue, where _synchronize_all_udomains()
needs to sync an AoR (empty, no contacts) to CacheDB, but @cdbc is NULL
in "attendant" process, per 7b62f24.
this avoids overlapping with other modules that register the pointer and
start storing in it immedately, without allowing to register other
indexes

(cherry picked from commit 267205d)
It provisiones the flags for the callee, rather than caller

(cherry picked from commit cb9c8c9)
Credits go to Bence Szigeti for reporting and troubleshooting!

(cherry picked from commit 46e3d05)
Many thanks to Voxtronic for spotting this issue!

(cherry picked from commit 471dab3)
razvancrainea and others added 28 commits May 19, 2025 10:57
Many thanks to Nick Altmann for reporting it!

(cherry picked from commit 5123cb8)
(cherry picked from commit 4754e12)
Thanks to Walter Schober on mailing list for reporing the inconsistency

(cherry picked from commit 6da409d)
Fix buffer overflow in dnscache (OpenSIPS#3669)

(cherry picked from commit 0371946)
(cherry picked from commit cdd4725)
Resolve the issue of inaccurate tcp_connections_no

(cherry picked from commit 38efd08)
The parameter is a string, not pvar, so does not need to be evaluated
Fixes OpenSIPS#3645
Reported by @gostkov
Resolve the issue of incomplete transmission of large SIP message over TLS protocol

(cherry picked from commit 0c54ee7)
Be sure and flush all pending HEP (tracing) messages on a TLS conn, even if the SSL negociation failed.
Closes OpenSIPS#3496.

(cherry picked from commit 5d599a8)
when cgrates ctx is being replicated, we need to release it when the
dialog is destroyed, otherwise it will leak.

Many thanks for @NicoFrLy on GitHub for reporting it.
Close OpenSIPS#3656

(cherry picked from commit 30c5fdf)
Stop leaving sockets in CLOSE_WAIT on failed TLS connections

(cherry picked from commit fde3ff3)
* Ignore unknown AVPs in replies

* Clarify Log

(cherry picked from commit e0ae3c2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

upstream merge Upstream merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.