Module: kamailio
Branch: master
Commit: 2df6fd2b92c95791fa299500680a31814f95291c
URL:
https://github.com/kamailio/kamailio/commit/2df6fd2b92c95791fa299500680a318…
Author: S-P Chan <shihping.chan(a)gmail.com>
Committer: S-P Chan <shihping.chan(a)gmail.com>
Date: 2024-12-20T17:01:03+08:00
tls: warn if thread-locals are initialized before this module
---
Modified: src/modules/tls/tls_mod.c
---
Diff:
https://github.com/kamailio/kamailio/commit/2df6fd2b92c95791fa299500680a318…
Patch:
https://github.com/kamailio/kamailio/commit/2df6fd2b92c95791fa299500680a318…
---
diff --git a/src/modules/tls/tls_mod.c b/src/modules/tls/tls_mod.c
index 1cc8a9540da..1d7169b27e6 100644
--- a/src/modules/tls/tls_mod.c
+++ b/src/modules/tls/tls_mod.c
@@ -401,6 +401,14 @@ static int mod_init(void)
return -1;
}
#endif
+#if OPENSSL_VERSION_NUMBER >= 0x10101000L
+ for(k = 0; k < 32; k++) {
+ if(pthread_getspecific(k) != 0) {
+ LM_WARN("detected initialized thread-locals created before tls.so; "
+ "tls.so must be the first module loaded\n");
+ }
+ }
+#endif /* OPENSSL_VERSION_NUMBER*/
if(tls_disable) {
LM_WARN("tls support is disabled "