Module: kamailio
Branch: master
Commit: 3a3856c68cf0cc04385921f8bbec72420cf8f656
URL: 
https://github.com/kamailio/kamailio/commit/3a3856c68cf0cc04385921f8bbec72420cf8f656

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2025-03-12T11:20:11+01:00

tls: get wss connections as well for selects and vars

- GH #4167

---

Modified: src/modules/tls/tls_select.c

---

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

---

diff --git a/src/modules/tls/tls_select.c b/src/modules/tls/tls_select.c
index 7945b23275a..6a2711bd36a 100644
--- a/src/modules/tls/tls_select.c
+++ b/src/modules/tls/tls_select.c
@@ -129,14 +129,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