[OpenSIPS-Devel] [ opensips-Bugs-3522687 ] drouting: improper code return for do_routing()
SourceForge.net
noreply at sourceforge.net
Tue May 1 05:44:58 CEST 2012
Bugs item #3522687, was opened at 2012-04-30 20:44
Message generated for change (Tracker Item Submitted) made by osas
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3522687&group_id=232389
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.8.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Ovidiu Sas (osas)
Assigned to: Nobody/Anonymous (nobody)
Summary: drouting: improper code return for do_routing()
Initial Comment:
When drouting dr_rules table is miss configured (the gwlist points to a non existing carrier), do_routing returns success and leaves the RURI unaltered.
This is causing looping.
I fixed the improper behaviour with the following patch:
Index: drouting.c
===================================================================
--- drouting.c (revision 8972)
+++ drouting.c (working copy)
@@ -1358,6 +1358,12 @@
rt_info = get_prefix( (*rdata)->pt, &username , (unsigned int)grp_id,
&prefix_len, &rule_idx);
+ if (rt_info && rt_info->pgwa_len==0) {
+ LM_ERR("no gws for dr group %d, rule_idx %d, username %.*s\n",
+ grp_id,rule_idx,username.len,username.s);
+ goto error2;
+ }
+
if (flags & DR_PARAM_STRICT_LEN) {
if (rt_info==NULL || prefix_len!=username.len)
goto error2;
Regards,
Ovidiu Sas
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3522687&group_id=232389
More information about the Devel
mailing list