Module: sip-router
Branch: 3.1
Commit: 9ef0a1e347abd31b352d3cb85326605fd72e6789
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9ef0a1e…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Thu Nov 4 17:14:56 2010 +0200
core:forward.c Fixed small error caused by unlikely usage.
(cherry picked from commit 6cfee82666b78400d5ff15c49aac1441cfbbaaf6)
---
forward.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/forward.c b/forward.c
index 3d7aed1..175f54b 100644
--- a/forward.c
+++ b/forward.c
@@ -175,7 +175,7 @@ retry:
if( !mhomed_sock_cache_disabled ){
/* some Linux kernel versions (all?) along with other UNIXes don't re-bound the sock if already bound */
/* to un-bound a socket set sin_family to AF_UNSPEC and zero out the rest*/
- if (unlikely(connect(*temp_sock, &uncon.s, sockaddru_len(uncon))) < 0)
+ if (unlikely(connect(*temp_sock, &uncon.s, sockaddru_len(uncon)) < 0))
mhomed_sock_cache_disabled = 1;
}
Module: sip-router
Branch: 3.1
Commit: 3ec1e92fcb3ce8c673e6762c0a35a9bc8ade3a22
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3ec1e92…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Thu Nov 4 16:11:41 2010 +0200
core/forward.c Fixed mhomed behavior.
As connect() dones't re-bound a UDP sock if the socket is already
bound to an interface, first unbind the socket by connecting to AF_UNSPEC
(cherry picked from commit ef0dd4e3f0837753ac18d58606078d8595f24dc6)
---
forward.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/forward.c b/forward.c
index 25bc11d..3d7aed1 100644
--- a/forward.c
+++ b/forward.c
@@ -131,6 +131,10 @@ struct socket_info* get_out_socket(union sockaddr_union* to, int proto)
union sockaddr_union from;
struct socket_info* si;
struct ip_addr ip;
+ union sockaddr_union uncon;
+
+ memset(&uncon, 0, sizeof(union sockaddr_union));
+ uncon.sin.sin_family = AF_UNSPEC;
if (unlikely(proto!=PROTO_UDP)) {
LOG(L_CRIT, "BUG: get_out_socket can only be called for UDP\n");
@@ -167,6 +171,14 @@ retry:
return 0;
}
}
+
+ if( !mhomed_sock_cache_disabled ){
+ /* some Linux kernel versions (all?) along with other UNIXes don't re-bound the sock if already bound */
+ /* to un-bound a socket set sin_family to AF_UNSPEC and zero out the rest*/
+ if (unlikely(connect(*temp_sock, &uncon.s, sockaddru_len(uncon))) < 0)
+ mhomed_sock_cache_disabled = 1;
+ }
+
if (unlikely(connect(*temp_sock, &to->s, sockaddru_len(*to))==-1)) {
if (unlikely(errno==EISCONN && !mhomed_sock_cache_disabled)){
/* no multiple connects support on the same socket */
Hi,
My sctp info value shows all zero. Is there any explanation?Is my setup
correct?
$sercmd core.sctp_info
{
opened_connections: 0
tracked_connections: 0
total_connections: 0
}
Thanking you.
Asif
On Mon, Feb 7, 2011 at 3:14 PM, Klaus Darilion <klaus.mailinglists(a)pernau.at
> wrote:
> Make sure you have the sctp libraries installed.
>
> regards
> klaus
>
> Am 06.02.2011 06:21, schrieb Asif Iqbal syed:
> > Hi,
> >
> > I have been trying to compile kamailio with sctp support enabled by
> > following the installation instruction from
> >
> http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.1.x-from-git.
> > Still no success. Here is what I am doing.
> >
> > 1. git clone --depth 1 git://git.sip-router.org/sip-router kamailio
> > 2. cd kamailio
> > 3. git checkout -b 3.1 origin/3.1
> > 4. make FLAVOUR=kamailio cfg
> > 5. nano -w modules.lst
> > 6. make FLAVOUR=kamailio include_modules="db_mysql dialplan" cfg
> > 7. make PREFIX="/usr/local/kamailio-3.1" FLAVOUR=kamailio
> > include_modules="db_mysql dialplan" cfg
> > 8. SCTP=1 make all
> > 9. SCTP=1 make install
> >
> > Then run kamailio and execute sercmd. Do core.sctp_info. It shows error
> 500:
> > sctp support not compiled.
> >
> > I would appreciate if someone help me what I am missing.
> >
> > Thanking you.
> >
> > Asif
> >
> >
> >
> >
> > _______________________________________________
> > sr-dev mailing list
> > sr-dev(a)lists.sip-router.org
> > http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#113 - Kamailio init script reports falsely "Kamailio already running"
User who did this - Klaus Darilion (klaus3000)
----------
patched the patch :-)
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=113#comment157
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has been changed. The changes are listed below. For full information about what has changed, visit the URL and click the History tab.
FS#113 - Kamailio init script reports falsely "Kamailio already running"
User who did this: Klaus Darilion (klaus3000)
Task details edited:
-------
Hi!
The init script for Debian always reports "Kamailio already running" if Kamailio does not start although the config is correct (e.g. can not bind to socket). IMO we could improve it a bit by checking if Kamailio is really running (at least check for PID file and process).
Attached is a patch which solves this, feel free to make it nicer.
-------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=113
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#113 - Kamailio init script reports falsely "Kamailio already running"
User who did this - Klaus Darilion (klaus3000)
----------
uploaded patch as file (whitespaces)
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=113#comment156
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Klaus Darilion (klaus3000)
Attached to Project - sip-router
Summary - Kamailio init script reports falsely "Kamailio already running"
Task Type - Bug Report
Category - tools/scripts
Status - New
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - Hi!
The init script for Debian always reports "Kamailio already running" if Kamailio does not start although the config is correct (e.g. can not bind to socket). IMO we could improve it a bit by checking if Kamailio is really running (at least check for PID file and process).
This is a patch which solves this, feel free to make it nicer.
--- kamailio.orig 2011-02-11 18:55:28.000000000 +0100
+++ kamailio 2011-02-11 19:20:43.000000000 +0100
@@ -124,8 +124,16 @@
echo -n "Starting $DESC: $NAME"
start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --exec $DAEMON -- $OPTIONS || echo -n " already running"
- echo "."
+ --exec $DAEMON -- $OPTIONS || if [ ! -r "$PIDFILE" ]; then
+ echo " error, failed to start."
+ exit 3
+ elif read pid < "$PIDFILE" && ps -p "$pid" > /dev/null 2>&1; then
+ echo -n " already running"
+ echo "."
+ else
+ echo " error, failed to start ($PIDFILE exists)."
+ exit 1
+ fi
;;
stop)
echo -n "Stopping $DESC: $NAME"
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=113
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Don't ask me why anyone would want to do this, but, for simple stateful
relay scenario:
UAC --> Kamailio --> UAS
This:
remove_hf("Via");
msg_apply_changes();
will crash Kamailio:
Feb 10 18:54:22 diminuendo-1 /usr/local/sbin/kamailio[30982]: ERROR: tm
[t_lookup.c:540]: ERROR: t_lookup_request: no via
Feb 10 18:54:22 diminuendo-1 /usr/local/sbin/kamailio[30981]: ALERT:
<core> [main.c:741]: child process 30982 exited by a signal 11
--
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/