Module: kamailio
Branch: 5.8
Commit: f807c4d249bff27007dc8898a338ad7be4f45ea7
URL: 
https://github.com/kamailio/kamailio/commit/f807c4d249bff27007dc8898a338ad7be4f45ea7

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-03-20T07:30:51+01:00

tls: get wss connections as well for selects and vars

- GH #4167

(cherry picked from commit 3a3856c68cf0cc04385921f8bbec72420cf8f656)
(cherry picked from commit b3cb2b38c5d81c48b0b6315cb7feb99d236d15e3)

---

Modified: src/modules/tls/tls_select.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/f807c4d249bff27007dc8898a338ad7be4f45ea7.diff
Patch: 
https://github.com/kamailio/kamailio/commit/f807c4d249bff27007dc8898a338ad7be4f45ea7.patch

---

diff --git a/src/modules/tls/tls_select.c b/src/modules/tls/tls_select.c
index 8b1a0457c0a..ad8654b1050 100644
--- a/src/modules/tls/tls_select.c
+++ b/src/modules/tls/tls_select.c
@@ -127,14 +127,14 @@ struct tcp_connection *get_cur_connection(struct sip_msg 
*msg)
        if(_tls_pv_con != 0)
                return _tls_pv_con;
 
-       if(msg->rcv.proto != PROTO_TLS) {
+       if(msg->rcv.proto != PROTO_TLS && msg->rcv.proto != PROTO_WSS) {
                ERR("Transport protocol is not TLS (bug in config)\n");
                return 0;
        }
 
        c = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0,
                        cfg_get(tls, tls_cfg, con_lifetime));
-       if(c && c->type != PROTO_TLS) {
+       if(c && c->type != PROTO_TLS && msg->rcv.proto != PROTO_WSS) {
                ERR("Connection found but is not TLS\n");
                tcpconn_put(c);
                return 0;

_______________________________________________
Kamailio - Development Mailing List -- sr-dev@lists.kamailio.org
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to