Found an issue - please try the attached patch to see if it solves your problem.

Regards,
Bogdan

logan wrote:
Perhaps there is another cause for this behavior then, the duplicated hash id was the first thing that popped out at me. But if they're useless than that's not it.

However I have a scenario here that I can replicate 100% of the time when the two different IPs in question are present in the address table. When one is removed I stop getting the DBG:permissions:get_source_group: Found <-1> response and the address is found correctly and calls are able to route.

Have you seen behavior like this before?
------------------------------------------------------------------------

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Bogdan-Andrei Iancu
OpenSIPS Bootcamp
15 - 19 November 2010, Edison, New Jersey, USA
www.voice-system.ro

Index: modules/permissions/hash.c
===================================================================
--- modules/permissions/hash.c  (revision 7277)
+++ modules/permissions/hash.c  (working copy)
@@ -215,12 +215,11 @@
        str_ip.len = ip->len;
        str_ip.s = (char*) ip->u.addr;
 
-       for (node = table[perm_hash(str_ip)]; node; node = node->next)
-                       if (node->port == 0 || node->port == port) {
-                               if (!ip_addr_cmp(ip, node->ip)) goto not_found;
+       for (node = table[perm_hash(str_ip)]; node; node = node->next) {
+                       if ( (node->port == 0 || node->port == port) &&
+                       ip_addr_cmp(ip, node->ip) )
                                return node->grp;
-                       }
-not_found:
+       }
        return -1;
 }
 
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to