Module: sip-router
Branch: master
Commit: 69515cab5eefb3b272617fc46565d58e8b392619
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=69515ca…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Feb 26 23:13:59 2009 +0000
config: tcp_async alias for tcp_buf_write
- tcp_buf_write was not the best choosen name, so tcp_async was added as an
alias for it
---
NEWS | 3 ++-
cfg.lex | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index 6318d2a..f3cbfb3 100644
--- a/NEWS
+++ b/NEWS
@@ -273,9 +273,10 @@ new config variables:
will be cached inside the process calling tcp_send (performance increase
for sending over tcp at the cost of slightly slower connection closing and
extra FDs kept open)
- tcp_buf_write = yes | no (default no) - if enabled all the tcp writes that
+ tcp_async = yes | no (default no) - if enabled all the tcp writes that
would block / wait for connect to finish, will be queued and attempted
latter (see also tcp_conn_wq_max and tcp_wq_max).
+ tcp_buf_write = synonim for tcp_async
tcp_conn_wq_max = bytes (default 32 K) - maximum bytes queued for write
allowed per connection. Attempting to queue more bytes would result
in an error and in the connection being closed (too slow). If
diff --git a/cfg.lex b/cfg.lex
index 0c4ac17..e36a625 100644
--- a/cfg.lex
+++ b/cfg.lex
@@ -301,7 +301,7 @@ TCP_MAX_CONNECTIONS "tcp_max_connections"
TCP_SOURCE_IPV4 "tcp_source_ipv4"
TCP_SOURCE_IPV6 "tcp_source_ipv6"
TCP_OPT_FD_CACHE "tcp_fd_cache"
-TCP_OPT_BUF_WRITE "tcp_buf_write"
+TCP_OPT_BUF_WRITE "tcp_buf_write"|"tcp_async"
TCP_OPT_CONN_WQ_MAX "tcp_conn_wq_max"
TCP_OPT_WQ_MAX "tcp_wq_max"
TCP_OPT_DEFER_ACCEPT "tcp_defer_accept"
Module: sip-router
Branch: master
Commit: 38429f23ff8a73c16c1b02812fa4a27cf28c0cb1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=38429f2…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Thu Feb 26 23:13:22 2009 +0000
tcp: blacklist at tcp level if possible
- automatically blacklist destinations if connecting to them fails
(BLST_ERR_CONNECT) or send fails (BLST_ERR_SEND), either due to a
protocol error (RST, protocol level timeout a.s.o), or because
of a ser level send/connect timeout.
Note: in this cases the sip_msg parameter of the blacklist will
be null (since in general the message triggering the error is not
known), so if you register a blacklist callback you should make
sure it works with null sip_msgs too.
- if a connection is in a connect pending state (S_CONN_CONNECT)
and something is read on it, move it into established state
(S_CONN_OK). This can happen only in tcp async mode.
- fix transition directly to S_CONN_OK from S_CONN_PENDING (should go
through S_CONN_CONNECT first)
---
tcp_main.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
tcp_read.c | 27 ++++++++++++-
2 files changed, 139 insertions(+), 8 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=384…
Module: sip-router
Branch: master
Commit: 047b1dfb8958f4ba29fd77ed44e7cb17fdd106b1
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=047b1df…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Fri Feb 27 21:15:27 2009 +0000
sctp: direct blacklist support
- blacklist support at the sctp level. If sctp_send_retries are
used, the blacklist will work only for send (using
SCTP_SEND_FAILED notifications). If sctp_send_retries is not
used (default), there are 2 possible blacklist reasons: SEND or
CONNECT (assoc. failed to be opened).
---
sctp_server.c | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/sctp_server.c b/sctp_server.c
index 7ac8444..9b8688f 100644
--- a/sctp_server.c
+++ b/sctp_server.c
@@ -22,6 +22,7 @@
* History:
* --------
* 2008-08-07 initial version (andrei)
+ * 2009-02-27 blacklist support (andrei)
*/
#ifdef USE_SCTP
@@ -49,6 +50,9 @@
#include "mem/mem.h"
#include "ip_addr.h"
#include "cfg/cfg_struct.h"
+#ifdef USE_DST_BLACKLIST
+#include "dst_blacklist.h"
+#endif /* USE_DST_BLACKLIST */
@@ -643,6 +647,16 @@ static int sctp_handle_send_failed(struct socket_info* si,
ret=sctp_msg_send_raw(&dst, data, data_len, &sinfo);
}
+#ifdef USE_DST_BLACKLIST
+ else if (cfg_get(core, core_cfg, use_dst_blacklist) &&
+ sctp_options.sctp_send_retries) {
+ /* blacklist only if send_retries is on, if off we blacklist
+ from SCTP_ASSOC_CHANGE: SCTP_COMM_LOST/SCTP_CANT_STR_ASSOC
+ which is better (because we can tell connect errors from send
+ errors and we blacklist a failed dst only once) */
+ dst_blacklist_su(BLST_ERR_SEND, PROTO_SCTP, su, 0);
+ }
+#endif /* USE_DST_BLACKLIST */
return (ret>0)?0:ret;
}
@@ -665,7 +679,7 @@ static int sctp_handle_notification(struct socket_info* si,
text " too short (%d bytes instead of %d bytes)\n", \
su2a((from_su), sizeof(*(from_su))), \
(bind_addr)->name.len, (bind_addr)->name.s, \
- (bind_addr)->port_no, (length), (val)); \
+ (bind_addr)->port_no, (int)(length), (int)(val)); \
goto error; \
}
@@ -735,6 +749,21 @@ static int sctp_handle_notification(struct socket_info* si,
snp->sn_assoc_change.sac_outbound_streams,
snp->sn_assoc_change.sac_inbound_streams
);
+#ifdef USE_DST_BLACKLIST
+ /* blacklist only if send_retries is turned off (if on we don't
+ know here if we did retry or we are at the first error) */
+ if (cfg_get(core, core_cfg, use_dst_blacklist) &&
+ (sctp_options.sctp_send_retries==0)){
+ switch(snp->sn_assoc_change.sac_state) {
+ case SCTP_CANT_STR_ASSOC:
+ dst_blacklist_su(BLST_ERR_CONNECT, PROTO_SCTP, su, 0);
+ break;
+ case SCTP_COMM_LOST:
+ dst_blacklist_su(BLST_ERR_SEND, PROTO_SCTP, su, 0);
+ break;
+ }
+ }
+#endif /* USE_DST_BLACKLIST */
break;
#ifdef SCTP_ADAPTION_INDICATION
case SCTP_ADAPTION_INDICATION:
Hello,
There is a new page in the wiki which contains my version of the configuration
file for git:
http://sip-router.org/wiki/git/gitconfig
Some of the options were not so easy to figure out, so I decided to share the
config file to make your git learning curve less steep than mine was (and is
:-). The file is well commented.
Save the configuration file in ~/.gitconfig and set your name and email
address to your real name and real email address. After that you get your copy
of the sip-router repository using:
mkdir my_repo
cd my_repo
git init
git fetch sr
You have pulled the whole history when the last command finished. "sr" is a
shorthand for the sip-router git repository.
As the next step you can check out the master branch, this is where the most
recent source code is (it is an equivalent of the trunk in svn or HEAD in cvs):
git co -b master sr/master
"co" is an alias for checkout, this alias is defined in the configuration
file.
So now you have your very own copy of the sip-router repository, but that's
not all, you can also pull the whole kamailio repository into it:
g fetch km
"km" is a shorthand for the git mirror of the kamailio svn repository. This
command will produce a lot of output (don't be scared) and after it finishes
you will have the full history of both projects--sip-router and kamailio--in
your local git repository. You can, for example, check out kamailio svn trunk
using:
git co -b kam_trunk km/trunk
And now you have the sources from kamailio trunk in your working directory.
You can, of course do the same for SER from CVS, to get the latest sources of
ser:
git fetch cvs
"cvs" is a shorthand for the git import of the ser cvs repository. Now you can
switch to cvs trunk using:
git co -b cvs_trunk cvs/cvs-head
And now you have the latest ser sources in your working directory.
And the last repository you can fetch from is the opensips git import:
git fetch os
git co -b opensips_trunk os/trunk
And you have the latest sources from opensips trunk.
To display all branches from all repositories run:
git branch -a
The most important branches are:
sr/master - Latest version of sip-router core
cvs/cvs-head - Latest version of ser from cvs
km/trunk - Kamailio svn trunk
km/1.4 - Kamailio branch with release 1.4
os/trunk - Opensips svn trunk
Jan.
Module: sip-router
Branch: master
Commit: 90bb3224cc75db8dbaab3c2c21c54dddad544b79
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=90bb322…
Author: Jan Janak <jan(a)iptel.org>
Committer: Jan Janak <jan(a)iptel.org>
Date: Mon Feb 23 22:58:35 2009 +0100
Merge branch 'master' of ssh://janakj@git.sip-router.org/sip-router
* 'master' of ssh://janakj@git.sip-router.org/sip-router:
tcp: fix compilation problem on solaris (FIONREAD)
core: fix bad level name in new LOG()
t_check_status() checks also the blind UACs if t_pick_branch()
Documenting t_lookup_cancel() script function.
Removing set_t() from t_lookup_cancel() function, and introducing
updated udp_mtu handling code - fixes SER-433
documenting t_is_expired() function
t_is_expired() script function is introduced.
* logging API updated (see doc/logging-api.txt for details)
- AS support disabled by default.
When building the route set of ACKs for local UACs, only the reply is now
In case the AVP is a regexp, an allocation is required to build an AVP
Currently, SER matches E2E ACKs only if there is an equality between From HF
The calculate_routeset_length() produces an invalid result in the case
'memapp' and 'append_mem_block' are now both only used in source
"Route :" prefix (and separator) is used some more time across the
script: udp_mtu fallback script config & commands
core: forward: tcp fallback for big udp packets
---