THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#14 - TLS modul problem
User who did this - Andrei Pelinescu-Onciul (andrei)
Reason for closing: Fixed
Additional comments about closing: Hopefully fixed, see git#68e944.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=14
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.
Module: sip-router
Branch: master
Commit: c390fed30a67655a8d45c7210b06d82bde9f3820
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=c390fed…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Sep 21 18:41:26 2009 +0200
tcp: tls fix_read_con hook return changes
tls_fix_read_con doesn't change the tcp connection state any
longer, relying instead on different return codes.
---
tcp_read.c | 6 +++---
tls_hooks.h | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/tcp_read.c b/tcp_read.c
index 7d45d53..b79e2e2 100644
--- a/tcp_read.c
+++ b/tcp_read.c
@@ -651,11 +651,11 @@ int tcp_read_req(struct tcp_connection* con, int* bytes_read, int* read_flags)
req=&con->req;
#ifdef USE_TLS
if (con->type==PROTO_TLS){
- if (tls_fix_read_conn(con)!=0){
+ ret=tls_fix_read_conn(con);
+ if (unlikely(ret<0)){
resp=CONN_ERROR;
goto end_req;
- }
- if (unlikely(con->state!=S_CONN_OK && con->state!=S_CONN_ACCEPT))
+ }else if (unlikely(ret==0))
goto end_req; /* not enough data */
}
#endif
diff --git a/tls_hooks.h b/tls_hooks.h
index 5b17ca6..462ad3d 100644
--- a/tls_hooks.h
+++ b/tls_hooks.h
@@ -51,7 +51,11 @@ struct tls_hooks{
/* checks if a tls connection is fully established before a read, and if
* not it runs tls_accept() or tls_connect() as needed
* (tls_accept and tls_connect are deferred to the "reader" process for
- * performance reasons) */
+ * performance reasons)
+ * returns 1 if the read can continue, 0 if the connection is not yet
+ * ready for the read and fix_read_con() should be attempted at a latter
+ * time and <0 on error.
+ */
int (*fix_read_con)(struct tcp_connection* c);
/* per listening socket init, called on ser startup (after modules,
Module: sip-router
Branch: master
Commit: 6d263c0c6152fea5991f02a26f24a6488e94c73b
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6d263c0…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Mon Sep 21 18:39:41 2009 +0200
tcp: remember which connections were accepted
Use a new flag to remember which connection were passively opened
(accept()) and which were locally initiated (connect).
---
tcp_conn.h | 1 +
tcp_main.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/tcp_conn.h b/tcp_conn.h
index 5338734..f596b59 100644
--- a/tcp_conn.h
+++ b/tcp_conn.h
@@ -75,6 +75,7 @@
#define F_CONN_WR_ERROR 2048 /* write error on the fd */
#define F_CONN_WANTS_RD 4096 /* conn. should be watched for READ */
#define F_CONN_WANTS_WR 8192 /* conn. should be watched for WRITE */
+#define F_CONN_PASSIVE 16384 /* conn. created via accept() and not connect()*/
enum tcp_req_errors { TCP_REQ_INIT, TCP_REQ_OK, TCP_READ_ERROR,
diff --git a/tcp_main.c b/tcp_main.c
index d2f7b59..0164d22 100644
--- a/tcp_main.c
+++ b/tcp_main.c
@@ -3433,6 +3433,7 @@ static inline int handle_new_connect(struct socket_info* si)
/* add socket to list */
tcpconn=tcpconn_new(new_sock, &su, dst_su, si, si->proto, S_CONN_ACCEPT);
if (likely(tcpconn)){
+ tcpconn->flags|=F_CONN_PASSIVE;
#ifdef TCP_PASS_NEW_CONNECTION_ON_DATA
atomic_set(&tcpconn->refcnt, 1); /* safe, not yet available to the
outside world */
Hello,
I just committed a new function in modules_k/textops -
msg_apply_changes(). Hopefully the name is suggestive enough - the
function applies the changes done to the content of sip message - e.g.,
if you added a new header, once you use the function, that header will
become visible in config file.
Therefore the function tries to overcome the overhead of looping various
messages back to sip server just because modifications were not visible
once done. Another benefit is ability to access latest value for a field
(being header or body content) in case of need to hashes or signatures
for security purposes.
The function can be used only in request route for now. Be carefully
when using it, since it changes the expectation you had so far of always
working on initially received sip message. Once the function is sued,
initial content is lost forever. Since it builds a new buffer and
re-parses, it is not very recommended to use it extensively.
Example of usage:
append_hf("My-Header: yes\r\n");
if(msg_apply_changes())
{
# msg buffer has a new content
if(is_present_hf("My-Header"))
{
# will get always here
}
}
Testing and feedback is welcome!
Cheers,
Daniel
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#16 - Local 487 forwarded upstream
User who did this - Andrei Pelinescu-Onciul (andrei)
----------
I think that the 487 on branch 3 arrives after the transaction has been deleted.
After the transaction gets the 200 on branch 1, it will be alive for 5 more s (or whatever value you have set for wt_timer).
So if the 487 on branch 3 comes more then 5 s after the 200 on branch 1, the transaction doesn't exist any more => the 487
is forwarded statelessly (which is correct behaviour).
If you have a pcap dump, I can check if this is the case and close the bug report (the log doesn't include the time).
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=16#comment7
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 is now closed:
FS#15 - Proto names are causing parser errors
User who did this - Andrei Pelinescu-Onciul (andrei)
Reason for closing: Fixed
Additional comments about closing: Thanks, fixed (see git#d29c95).
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=15
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 is now closed:
FS#17 - Makefile error prevent tls module from being build
User who did this - Andrei Pelinescu-Onciul (andrei)
Reason for closing: Fixed
Additional comments about closing: fixed, see git#ba3d64ff
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=17
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.