Hi
I am trying to compile openims ( make deb) under sip-router.
Here is what I did:
(1) Copy these modules cdp/pcscf etc to modules_osims
(2) Then change Makefile.dirs
modules_dirs= modules modules_s modules_k modules_osims
(3) change pkg/debian/rules:
MDIRS=modules modules_s modules_k modules_osims
And add modules_osims to
define PACKAGE_MODULE_INSTALL_template
$(MAKE) install-modules-all modules="$(mod)" \
modules_s="" modules_k=""
modules_osims="" \
as well
(4) Then make deb, it seems nothing under modules_osims got compiled,
Then I add modules_osims/cdp etc to ruls file:
MODULES_SP= ... modules_osims/cdp ...
(Not sure if need to add to PACKAGE_GROUPS?)
Now the files under modules_osims got compiled, but no seperated
module-deb files generated for those modules.
ser_2.99.0-dev01_i386.deb
ser-db-modules_2.99.0-dev01_i386.deb
....
Inside the ser_2.99.0-dev01_i386.deb there is no moduels from
modules_osims.
Anything missing?
Thanks.
Kind Regards
Min Wang
Module: sip-router
Branch: master
Commit: 51ee5da9ebf09447f71d4393f7c5b703305ff46d
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=51ee5da…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Tue Feb 23 16:10:21 2010 +0100
tls: disable kerberos more thoroughly [fix]
Older openssl versions (< 0.9.8e release) have a bug in the
kerberos code (it uses the wrong malloc, for more details see
openssl bug # 1467). While there is already a workaround for this
openssl bug in the sr code (see commits 36cb8f & 560a42), in some
situations this workaround causes another bug (crash on connection
opening when openssl is compiled with kerberos support and
kerberos is enabled for key exchange).
The current fix will disable automatically all the ciphers containing
KRB5 if the openssl version is < 0.9.8e beta1 or it is between
0.9.9-dev and 0.9.9-beta1.
It iss equivalent to setting cipher_list to "<prev. value>:!KRB5".
Impact: this fix is needed only if openssl is compiled with
kerberos support and the version is < 0.9.8e. It also affects at
least CentOS users with openssl-0.9.8e-12.el5_4.1 (in the centos
openssl package they play some strange games with the version and
report 0.9.8b via SSLeay).
Tested-by: Klaus Darilion klaus.mailinglists at pernau.at
Reported-by: Klaus Darilion klaus.mailinglists at pernau.at
Reported-by: Andreas Rehbein rehbein at e-technik.org
Reported-by: Martin Koenig koenig starface.de
---
modules/tls/tls_domain.c | 35 +++++++++++++++++++++++++++++++----
1 files changed, 31 insertions(+), 4 deletions(-)
diff --git a/modules/tls/tls_domain.c b/modules/tls/tls_domain.c
index b0d5d3c..c4f25e8 100644
--- a/modules/tls/tls_domain.c
+++ b/modules/tls/tls_domain.c
@@ -271,6 +271,10 @@ static int load_ca_list(tls_domain_t* d)
return 0;
}
+#define C_DEF_NO_KRB5 "DEFAULT:!KRB5"
+#define C_DEF_NO_KRB5_LEN (sizeof(C_DEF_NO_KRB5)-1)
+#define C_NO_KRB5_SUFFIX ":!KRB5"
+#define C_NO_KRB5_SUFFIX_LEN (sizeof(C_NO_KRB5_SUFFIX)-1)
/*
* Configure cipher list
@@ -279,12 +283,35 @@ static int set_cipher_list(tls_domain_t* d)
{
int i;
int procs_no;
-
- if (!d->cipher_list.s) return 0;
+ char* cipher_list;
+
+ cipher_list=d->cipher_list.s;
+#ifdef TLS_KSSL_WORKARROUND
+ if (openssl_kssl_malloc_bug) { /* is openssl bug #1467 present ? */
+ if (d->cipher_list.s==0) {
+ /* use "DEFAULT:!KRB5" */
+ cipher_list="DEFAULT:!KRB5";
+ } else {
+ /* append ":!KRB5" */
+ cipher_list=shm_malloc(d->cipher_list.len+C_NO_KRB5_SUFFIX_LEN+1);
+ if (cipher_list) {
+ memcpy(cipher_list, d->cipher_list.s, d->cipher_list.len);
+ memcpy(cipher_list+d->cipher_list.len, C_NO_KRB5_SUFFIX,
+ C_NO_KRB5_SUFFIX_LEN);
+ cipher_list[d->cipher_list.len+C_NO_KRB5_SUFFIX_LEN]=0;
+ shm_free(d->cipher_list.s);
+ d->cipher_list.s=cipher_list;
+ d->cipher_list.len+=C_NO_KRB5_SUFFIX_LEN;
+ }
+ }
+ }
+#endif /* TLS_KSSL_WORKARROUND */
+ if (!cipher_list) return 0;
procs_no=get_max_procs();
for(i = 0; i < procs_no; i++) {
- if (SSL_CTX_set_cipher_list(d->ctx[i], d->cipher_list.s) == 0 ) {
- ERR("%s: Failure to set SSL context cipher list\n", tls_domain_str(d));
+ if (SSL_CTX_set_cipher_list(d->ctx[i], cipher_list) == 0 ) {
+ ERR("%s: Failure to set SSL context cipher list \"%s\"\n",
+ tls_domain_str(d), cipher_list);
return -1;
}
}
Module: sip-router
Branch: master
Commit: 3303a5b1f7c4ead6b0edd21d20e65b9957359200
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3303a5b…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Wed Feb 17 13:57:05 2010 +0200
Modules/registrar : update stats even if -DSTATISTICS was not passed to the compiles(this was the default)
update_stat was called even if the statistics where not added to the stats framework.
---
modules_k/registrar/save.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/modules_k/registrar/save.c b/modules_k/registrar/save.c
index b641479..3b479f6 100644
--- a/modules_k/registrar/save.c
+++ b/modules_k/registrar/save.c
@@ -780,18 +780,16 @@ int save(struct sip_msg* _m, char* _d, char* _cflags)
goto error;
ret = (ret==0)?1:ret;
}
-#ifdef STATISTICS
+
update_stat(accepted_registrations, 1);
-#endif
+
/* Only send reply upon request, not upon reply */
if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) && (reg_send_reply(_m) < 0))
return -1;
return ret;
error:
-#ifdef STATISTICS
update_stat(rejected_registrations, 1);
-#endif
if ((route_type == REQUEST_ROUTE) && !is_cflag_set(REG_SAVE_NORPL_FL) )
reg_send_reply(_m);
Hello,
I have a question regarding the "SWITCH" statement from the core of
sip-router / kamailio.
In the news publication
(http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x) I found a
description that the switch statement now supports "regular expression for
matching string".
However, when I try the example (as displayed on the wiki page) I get
different error messages. The example that I've tested looks like:
switch($rU) {
case /^123/:
sl_send_reply("200", "yippie - ^123 works");
case /^124.*/:
sl_send_reply("200", "yippie - ^124.* works");
break;
}
Worst case was using the first case with the case label "/^123/".
That resulted in a segmentation fault (!) with following error messages:
loading modules under /usr/lib/kamailio/
0(23229) : <core> [cfg.y:3329]: parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 374, column 16: syntax error
0(23229) : <core> [cfg.y:3329]: parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 374, column 16: bad expression
Segmentation fault
When I added ".*" to /^123/ as in case "/^124.*/" the error message was:
loading modules under /usr/lib/kamailio/
0(23256) : <core> [cfg.y:3329]: parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 374, column 15: syntax error
0(23256) : <core> [cfg.y:3329]: parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 374, column 15: bad case label
0(23256) : <core> [cfg.y:3329]: parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 374, column 15: bad case
0(23256) : <core> [cfg.y:3329]: parse error in config file
/usr/local/etc/kamailio/kamailio.cfg, line 379, column 5: bad switch body
What does sip-router / kamailio now REALLY support? Is the information about RegEx a mistake on the web page or is only the syntax wrong? However, in the CoreCookbook no entry can be found regarding RegEx for switch statement......
Regards,
Klaus
--
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/atbrowser
Hello
In cfg/cfg_ctx.c : 888 there is the definition of the function
cfg_get_by_name which gets called in case of a "sercmd cfg.get" command
...
if (var->def->on_change_cb) {
/* The variable cannot be retrieved, because the fixup
function may have changed it, and it is better to return
an error than an incorrect value */
return 1;
}
...
The "problem" is that if a use a fixup callback(or a on_change
callback) , this function returns an error and the value cannot be read
anymore via sercmd.
What is the best way to proceed in this case? I am currently working on
the modules_k/registrar module and if STATISTICS are used (default in
kamailio build), I need to register some callbacks to be called when
sercmd cfg.set_now_int (set_delayed_int) are called so I update
kamailio's statistics framework with the new values passed from ser cfg
framework. (for example min_expires, max_expires and others)
Is there a way for the cfg framework to specify that the callback
doesn't change the value (like in the case above)?
Any ideas welcome.
Cheers
Marius
Hi!
With kamailio 3.0 I encounter lots of crashes. I am using SNOM 320 and
eyebeam clients. I think crashes are mostly correlated with SNOM 320.
Server is CentOS5.4. OpenSSL is openssl-0.9.8e-12.el5_4.1.
First crashed Kamailio always with the same backtrace:
Program terminated with signal 11, Segmentation fault.
[New process 1580]
#0 0x0017451d in kssl_keytab_is_available () from /lib/libssl.so.6
(gdb) bt
#0 0x0017451d in kssl_keytab_is_available () from /lib/libssl.so.6
#1 0x00156d01 in ssl3_choose_cipher () from /lib/libssl.so.6
#2 0x00151b45 in ssl3_get_client_hello () from /lib/libssl.so.6
#3 0x00152525 in ssl3_accept () from /lib/libssl.so.6
#4 0x00167eda in SSL_accept () from /lib/libssl.so.6
#5 0x004a6cff in tls_accept (c=0xb60ff4a0, error=0x0) at tls_server.c:327
#6 0x004ac15b in tls_h_fix_read_conn (c=0xb60ff4a0) at tls_server.c:1005
#7 0x0813d146 in tcp_read_req (con=0xb60ff4a0, bytes_read=0xbfe248b4,
read_flags=0xbfe248b0) at tcp_read.c:654
#8 0x0813d8ef in handle_io (fm=0x82aa9d0, events=1, idx=-1) at
tcp_read.c:930
#9 0x08141513 in tcp_receive_loop (unix_sock=27) at io_wait.h:1057
#10 0x0810fc1b in tcp_init_children () at tcp_main.c:4253
#11 0x0809ae69 in main_loop () at main.c:1525
#12 0x0809bc02 in main (argc=1, argv=0xbfe24cc4) at main.c:2251
(gdb) quit
Then I configured RSA ciphers (as suggested by others) and now I get
different backtraces. Here is an example where Kamailio wrote 2 core files:
1. Program terminated with signal 11, Segmentation fault.
[New process 1735]
#0 0x004d01d3 in free_hash_table () at h_table.c:423
423
clist_foreach_safe(&_tm_table->entries[i], p_cell, tmp_cell,
(gdb) bt
#0 0x004d01d3 in free_hash_table () at h_table.c:423
#1 0x004de1a0 in tm_shutdown () at t_funcs.c:126
#2 0x08104ef2 in destroy_modules () at sr_module.c:635
#3 0x08098400 in cleanup (show_status=1) at main.c:509
#4 0x0809912e in shutdown_children (sig=<value optimized out>,
show_status=1) at main.c:649
#5 0x08099aa4 in handle_sigs () at main.c:740
#6 0x0809aab9 in main_loop () at main.c:1562
#7 0x0809bc02 in main (argc=1, argv=0xbfc70b74) at main.c:2251
2. Program terminated with signal 11, Segmentation fault.
[New process 1759]
#0 0x004f24ce in t_reply_matching (p_msg=0x8298cf0,
p_branch=0xbfc70424) at t_lookup.c:983
983 if (p_cell->label != entry_label)
(gdb) bt
#0 0x004f24ce in t_reply_matching (p_msg=0x8298cf0,
p_branch=0xbfc70424) at t_lookup.c:983
#1 0x004f5559 in t_check_msg (p_msg=0x8298cf0, param_branch=0xbfc70424)
at t_lookup.c:1138
#2 0x004f5e94 in t_check (p_msg=0x8298cf0, param_branch=0xbfc70424) at
t_lookup.c:1180
#3 0x005140d9 in reply_received (p_msg=0x8298cf0) at t_reply.c:1897
#4 0x0808c764 in forward_reply (msg=0x8298cf0) at forward.c:689
#5 0x080c401e in receive_msg (
buf=0xb60fe088 "SIP/2.0 200 Ok\r\nVia: SIP/2.0/TLS
83.136.32.167:5061;branch=z9hG4bKcc38.0a7d6be7.0;i=2\r\nVia: SIP/2.0/TLS
10.10.0.51:40487;received=83.136.33.3;branch=z9hG4bK-d8754z-7b0f1727475bda32-1---d8754z-;rport=2"...,
len=1150, rcv_info=0xb60fded4) at receive.c:257
#6 0x0813cf41 in tcp_read_req (con=0xb60fdec0, bytes_read=0xbfc70768,
read_flags=0xbfc70760) at tcp_read.c:761
#7 0x0813da0b in handle_io (fm=0x82aa708, events=1, idx=-1) at
tcp_read.c:980
#8 0x08141513 in tcp_receive_loop (unix_sock=25) at io_wait.h:1057
#9 0x0810fc1b in tcp_init_children () at tcp_main.c:4253
#10 0x0809ae69 in main_loop () at main.c:1525
#11 0x0809bc02 in main (argc=1, argv=0xbfc70b74) at main.c:2251
Attached is the log file.
I can provided intensive logs (memdbg) too.
thanks
klaus
Module: sip-router
Branch: master
Commit: 75e52b43af0a445b18ccf17e0558da1f41e10337
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=75e52b4…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Feb 22 19:38:40 2010 +0100
tm: t_check_status & t_reply main onreply_route fix
- t_check_status: in some situations t_check_status left the
transaction referenced when called from main onreply_route (e.g.
t_check_status(); drop )
- t_reply: unref the transaction only when called from the main
onreply_route and not from tm onreply route
---
modules/tm/tm.c | 22 ++++++++++++++++++----
1 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/modules/tm/tm.c b/modules/tm/tm.c
index 513dc99..2b35681 100644
--- a/modules/tm/tm.c
+++ b/modules/tm/tm.c
@@ -902,7 +902,7 @@ static int t_check_status(struct sip_msg* msg, char *p1, char *foo)
str tmp;
fp = (fparam_t*)p1;
-
+ t = 0;
/* first get the transaction */
if (t_check(msg, 0 ) == -1) return -1;
if ((t = get_t()) == 0) {
@@ -989,11 +989,23 @@ static int t_check_status(struct sip_msg* msg, char *p1, char *foo)
regfree(re);
pkg_free(re);
}
-
+
+ if (unlikely(t && is_route_type(CORE_ONREPLY_ROUTE))){
+ /* t_check() above has the side effect of setting T and
+ REFerencing T => we must unref and unset it. */
+ UNREF( t );
+ set_t(T_UNDEFINED, T_BR_UNDEFINED);
+ }
if (n!=0) return -1;
return 1;
error:
+ if (unlikely(t && is_route_type(CORE_ONREPLY_ROUTE))){
+ /* t_check() above has the side effect of setting T and
+ REFerencing T => we must unref and unset it. */
+ UNREF( t );
+ set_t(T_UNDEFINED, T_BR_UNDEFINED);
+ }
if (s) pkg_free(s);
if ((fp->type != FPARAM_REGEX) && re) {
regfree(re);
@@ -1268,8 +1280,10 @@ inline static int w_t_reply(struct sip_msg* msg, char* p1, char* p2)
Note: this is needed only in the CORE_ONREPLY_ROUTE and not also in
the TM_ONREPLY_ROUTE.
*/
- UNREF( t );
- set_t(T_UNDEFINED, T_BR_UNDEFINED);
+ if (is_route_type(CORE_ONREPLY_ROUTE)) {
+ UNREF( t );
+ set_t(T_UNDEFINED, T_BR_UNDEFINED);
+ }
} else {
LOG(L_CRIT, "BUG: w_t_reply entered in unsupported mode\n");
ret = -1;