[sr-dev] [kamailio/kamailio] Fix ksr_version_control() for FreeBSD build (PR #3184)

Boris Korzun notifications at github.com
Tue Jul 12 17:33:40 CEST 2022


#### Pre-Submission Checklist
- [X] Commit message has the format required by CONTRIBUTING guide
- [X] Commits are split per component (core, individual modules, libs, utils, ...)
- [X] Each component has a single commit (if not, squash them into one commit)
- [X] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)

#### Type Of Change
- [X] Small bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)

#### Checklist:
- [X] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)

#### Description
There's a problem after upgrade to 5.6 on FreeBSD. Kamailio isn't starting successful.
```
14:19:20.540514 kamailio 40921 - - DEBUG: <core> [core/cfg.y:1964]: yyparse(): loading module tls.so
14:19:20.540893 kamailio 40921 - - DEBUG: <core> [core/sr_module.c:513]: ksr_locate_module(): found module to load </usr/local/lib/kamailio/modules/tls.so>
14:19:20.540912 kamailio 40921 - - DEBUG: <core> [core/sr_module.c:563]: load_module(): trying to load </usr/local/lib/kamailio/modules/tls.so>
14:19:20.543301 kamailio 40921 - - ERROR: <core> [core/sr_module.c:352]: ksr_version_control(): no version info in module </usr/local/lib/kamailio/modules/tls.so>: Undefined symbol "_nss_cache_cycle_prevention_function"
```
The problem is in `ksr_version_control()` probably. In FreeBSD environment it should to flush `dlerror` before call `dlsym()` - [dlopen(3)](https://www.freebsd.org/cgi/man.cgi?query=dlopen&sektion=3&format=html).

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/3184

-- Commit Summary --

  * core: fix ksr_version_control() for FreeBSD build

-- File Changes --

    M src/core/sr_module.c (3)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/3184.patch
https://github.com/kamailio/kamailio/pull/3184.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3184
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/3184 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220712/da95b7aa/attachment.htm>


More information about the sr-dev mailing list