Module: sip-router
Branch: 3.1
Commit: 2b0aabbfa20de81d3c65464c17ca0d90889721f9
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2b0aabb…
Author: Miklos Tirpak <miklos(a)iptel.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Thu Feb 10 14:26:14 2011 +0100
tm: t_pick_branch() cannot ingnore the pending blined UACs
Empty branches shall be considered pending branches
before their final response is set.
When all the responses were dropped in failure route and a new
blind UAC was added, t_pick_branch() did not realize that
there is still at least one pending branch, it returned an error
instead. Later on, the blind UAC was tried to be canceled causing
deadlock.
(cherry picked from commit 17fc9913737cf3314d317d9b62cfd3dc05f8376e)
---
modules/tm/t_reply.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index c18c716..e65d1b9 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -1042,8 +1042,11 @@ int t_pick_branch(int inc_branch, int inc_code, struct cell *t, int *res_code)
}
continue;
}
- /* skip 'empty branches' */
- if (!t->uac[b].request.buffer) continue;
+ /* skip 'empty branches'
+ * An empty branch without a final response is still considered
+ * to be a pending, incomplete branch. */
+ if ((!t->uac[b].request.buffer) && (t->uac[b].last_received>=200))
+ continue;
/* there is still an unfinished UAC transaction; wait now! */
if ( t->uac[b].last_received<200 )
return -2;
Hi,
I have tested the STUN code in sip-router (enabled by make STUN=1) and it
became quite clear that this code is based on old I-D's and probably
not tested/used against SIP outbound clients implemented according to
RFC 5626
this patch fixes some issues, removing the Fingerprint check which is not
needed, and fixing the XOR scrambling of XOR-MAPPED-ADDRESS. please review
it carefully and apply to your GIT tree if you are happy with it.
Signed-Off-By: Alfred E. Heggestad <aeh(a)db.org>
--