Module: kamailio
Branch: master
Commit: bca9768b6f2667bad8472fa99a113b8249ca0f9a
URL: https://github.com/kamailio/kamailio/commit/bca9768b6f2667bad8472fa99a113b8…
Author: Greg Troxel <gdt(a)lexort.com>
Committer: Greg Troxel <gdt(a)lexort.com>
Date: 2020-03-18T19:06:36-04:00
Makefile.defs: Only add -ldl on systems that use it
kamailio uses dlopen, and on some systems, one must link with -ldl.
On others, this is not needed and there is no libdl. For now, simply
omit -ldl on NetBSD (which doesn't have or require it), and don't try
to change behavior on other systems.
---
Modified: src/Makefile.defs
---
Diff: https://github.com/kamailio/kamailio/commit/bca9768b6f2667bad8472fa99a113b8…
Patch: https://github.com/kamailio/kamailio/commit/bca9768b6f2667bad8472fa99a113b8…
---
diff --git a/src/Makefile.defs b/src/Makefile.defs
index 3d28f3ef38..f6f39e3a01 100644
--- a/src/Makefile.defs
+++ b/src/Makefile.defs
@@ -210,9 +210,18 @@ endif
endif
+# dlopen requires -ldl on some systems, but not others. Until there
+# is clarity on which require -ldl, add just enough ifeq to fix
+# systems known not to use it.
+ifeq ($(OS), netbsd)
+LIBDL=""
+else
+LIBDL="-ldl"
+endif
+
ifeq ($(LIBSSL_SET_MUTEX_SHARED), 1)
CC_PMUTEX_OPTS = -pthread -DKSR_PTHREAD_MUTEX_SHARED
-LD_PMUTEX_OPTS = -pthread -rdynamic -ldl -Wl,-Bsymbolic-functions
+LD_PMUTEX_OPTS = -pthread -rdynamic $(LIBDL) -Wl,-Bsymbolic-functions
else
CC_PMUTEX_OPTS =
LD_PMUTEX_OPTS =
<!--
Kamailio Project uses GitHub Issues only for bugs in the code or feature requests. Please use this template only for bug reports.
If you have questions about using Kamailio or related to its configuration file, ask on sr-users mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
If you have questions about developing extensions to Kamailio or its existing C code, ask on sr-dev mailing list:
* http://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
Please try to fill this template as much as possible for any issue. It helps the developers to troubleshoot the issue.
If there is no content to be filled in a section, the entire section can be removed.
You can delete the comments from the template sections when filling.
You can delete next line and everything above before submitting (it is a comment).
-->
### Description
1) Using function `sip_trace_mode()` with parameter `d` to enable dialog tracing mode logs:
```
BUG: siptrace [siptrace.c:1671]: add_info_xavp(): URI should be in raw format here
ERROR: siptrace [siptrace.c:888]: sip_trace_helper(): failed to serialize siptrace info! Won't trace dialog!
```
2) If `trace_flag` is set and `sip_trace_mode("d")` is used before one of the parameterized variants of `sip_trace()` Kamailio segfaults.
### Troubleshooting
#### Reproduction
module parameters:
```
#!define FLT_SIPTRACE 5
modparam("siptrace", "trace_mode", 0)
modparam("siptrace", "trace_flag", FLT_SIPTRACE)
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "trace_to_database", 0)
modparam("siptrace", "hep_mode_on", 1)
modparam("siptrace", "hep_version", 3)
modparam("siptrace", "hep_capture_id", 1234)
```
1)
```
request_route {
...
if (is_method("INVITE")) {
sip_trace_mode("d");
}
}
```
2)
```
request_route {
...
if (is_method("INVITE")) {
setflag(FLT_SIPTRACE);
sip_trace_mode("d");
sip_trace("sip:1.2.3.4:9060");
}
}
```
#### Debugging Data
<!--
If you got a core dump, use gdb to extract troubleshooting data - full backtrace,
local variables and the list of the code at the issue location.
gdb /path/to/kamailio /path/to/corefile
bt full
info locals
list
If you are familiar with gdb, feel free to attach more of what you consider to
be relevant.
-->
```
(gdb) bt
#0 0x00007f498ffddeaf in memcpy () from /lib/x86_64-linux-gnu/libc.so.6
#1 0x00007f495ffb5369 in sip_trace_helper (msg=0x7f498c1703b8, dst=0x7fff45477ab0, duri=0x7fff45477a50, corid=0x0, dir=0x0, trace_type=SIPTRACE_TRANSACTION) at siptrace.c:871
#2 0x00007f495ffb7729 in w_sip_trace3 (msg=0x7f498c1703b8, dest=0x7f498c0863a8 "\210S\t\214I\177", correlation_id=0x0, trace_type_p=0x0) at siptrace.c:1041
#3 0x00007f495ffb6774 in w_sip_trace1 (msg=0x7f498c1703b8, dest=0x7f498c0863a8 "\210S\t\214I\177", p2=0x0) at siptrace.c:978
#4 0x00005603f0600ea1 in do_action (h=0x7fff45479270, a=0x7f498c0949a0, msg=0x7f498c1703b8) at core/action.c:1079
#5 0x00005603f060f4bd in run_actions (h=0x7fff45479270, a=0x7f498c093ca8, msg=0x7f498c1703b8) at core/action.c:1578
#6 0x00005603f0600d85 in do_action (h=0x7fff45479270, a=0x7f498c0a3758, msg=0x7f498c1703b8) at core/action.c:1064
#7 0x00005603f060f4bd in run_actions (h=0x7fff45479270, a=0x7f498c08f758, msg=0x7f498c1703b8) at core/action.c:1578
#8 0x00005603f060b397 in do_action (h=0x7fff45479270, a=0x7f498c0a3f68, msg=0x7f498c1703b8) at core/action.c:1248
#9 0x00005603f060f4bd in run_actions (h=0x7fff45479270, a=0x7f498c019500, msg=0x7f498c1703b8) at core/action.c:1578
#10 0x00005603f060fd0b in run_top_route (a=0x7f498c019500, msg=0x7f498c1703b8, c=0x0) at core/action.c:1663
...
(gdb) frame 1
#1 0x00007f495ffb5369 in sip_trace_helper (msg=0x7f498c1703b8, dst=0x7fff45477ab0, duri=0x7fff45477a50, corid=0x0, dir=0x0, trace_type=SIPTRACE_TRANSACTION) at siptrace.c:871
871 memcpy(info->u.dup_uri.s, duri->s, duri->len);
(gdb) info locals
alloc_size = 88
info = 0x7f4967941fe0
__func__ = "sip_trace_helper"
(gdb) p *info
$1 = {correlation_id = {s = 0x0, len = 0}, u = {dup_uri = {s = 0x0, len = 0}, dest_info = {send_sock = 0x0, to = {s = {sa_family = 0, sa_data = '\000' <repeats 13 times>}, sin = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0},
sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 0, sin6_port = 0, sin6_flowinfo = 0, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}},
id = 0, send_flags = {f = 0, blst_imask = 0}, proto = 0 '\000', proto_pad0 = 0 '\000', proto_pad1 = 0}}, uriState = STRACE_RAW_URI}
(gdb) p *dst
$2 = {send_sock = 0x0, to = {s = {sa_family = 2, sa_data = "#d\001\002\003\004\000\000\000\000\000\000\000"}, sin = {sin_family = 2, sin_port = 25635, sin_addr = {s_addr = 67305985}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2,
sin6_port = 25635, sin6_flowinfo = 67305985, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, id = 0, send_flags = {f = 0, blst_imask = 0}, proto = 1 '\001',
proto_pad0 = 0 '\000', proto_pad1 = 0}
```
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
```
% kamailio -v
version: kamailio 5.4.0-dev3 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 6.3.0
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2250
Hi
When i was cross compiling for Mips,
1) make ---- is success
2) make install ------ is giving below error
------------------------------------------------------------------------------
CC
(/home/subhra/SDK3.1.2/tools-3.1.2_build_50/bin/mips64-octeon-linux-gnu-gcc)
[U kamcmd] kamcmd.o
kamcmd.c:47:31: fatal error: readline/readline.h: No such file or directory
compilation terminated.
../../src//Makefile.rules:100: recipe for target 'kamcmd.o' failed
make[2]: *** [kamcmd.o] Error 1
-------------------------------------------------------
I have installed readline-dev using apt-get install libreadline-dev
Please help me how to get rid of this error.
Thanks and Regards
Subhra Prakash Giri
Dear Henning
When i was cross compiling for Mips,
1) make ---- is success
2) make install ------ is giving below error
------------------------------------------------------------------------------
CC
(/home/subhra/SDK3.1.2/tools-3.1.2_build_50/bin/mips64-octeon-linux-gnu-gcc)
[U kamcmd] kamcmd.o
kamcmd.c:47:31: fatal error: readline/readline.h: No such file or directory
compilation terminated.
../../src//Makefile.rules:100: recipe for target 'kamcmd.o' failed
make[2]: *** [kamcmd.o] Error 1
-------------------------------------------------------
I have installed readline-dev using apt-get install libreadline-dev
Please help me how to get rid of this error.
Thanks and Regards
Subhra Prakash Giri
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [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
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [X] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [X] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
<!-- Describe your changes in detail -->
We have some user agents that make another subscribe with the same callid, when IP changes. Need to delete the old subscription in that case.
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/2254
-- Commit Summary --
* presence: add delete_same_subs modparam
-- File Changes --
M src/modules/presence/doc/presence_admin.xml (20)
M src/modules/presence/hash.c (34)
M src/modules/presence/hash.h (4)
M src/modules/presence/presence.c (2)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/2254.patchhttps://github.com/kamailio/kamailio/pull/2254.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/2254