<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Your patch seemed to be only for matching against individual IP
addresses, I added also for subnet matching. Can you try with the
patch from next commit?<br>
<br>
-
<a class="moz-txt-link-freetext" href="http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0c67042fa629ee4744cfc31a15e571b7340b0881">http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0c67042fa629ee4744cfc31a15e571b7340b0881</a><br>
<br>
Cheers,<br>
Daniel<br>
<br>
<div class="moz-cite-prefix">On 06/01/14 13:09, Kelvin Chua wrote:<br>
</div>
<blockquote
cite="mid:CAMF97-dZcCx2HcmZMtB9eU5Qnjnnnd7E=Az1ZeH7XkYBQH+Qtw@mail.gmail.com"
type="cite">
<div dir="ltr">sorry my bad, it is available on the other address
functions, just not on the allow_source_address_group.
<div>anyway, here is the patch to master</div>
<div><br>
</div>
<div>
<div>diff --git a/modules/permissions/hash.c
b/modules/permissions/hash.c</div>
<div>index 3a16581..c80a3f2 100644</div>
<div>--- a/modules/permissions/hash.c</div>
<div>+++ b/modules/permissions/hash.c</div>
<div>@@ -486,13 +486,23 @@ int
find_group_in_addr_hash_table(struct addr_list** table,</div>
<div>
{</div>
<div> struct addr_list *np;</div>
<div> str addr_str;</div>
<div>+ int_str avp_val;</div>
<div> </div>
<div> addr_str.s = (char*)addr->u.addr;</div>
<div> addr_str.len = 4;</div>
<div>
</div>
<div>+ get_tag_avp(&tag_avp, &tag_avp_type);</div>
<div> for (np = table[perm_hash(addr_str)]; np != NULL;
np = np->next) {</div>
<div> if (((np->port == 0) || (np->port
== port))</div>
<div> &&
ip_addr_cmp(&np->addr, addr)) {</div>
<div>+ if ( np->tag.s != NULL ) {</div>
<div>+ avp_val.s.s = (char
*)np->tag.s;</div>
<div>+ avp_val.s.len =
strlen(avp_val.s.s);</div>
<div>+ if
(add_avp(tag_avp_type|AVP_VAL_STR, tag_avp, avp_val) != 0) {</div>
<div>+ LM_ERR("failed to
set of tag_avp failed\n");</div>
<div>+ return -1;</div>
<div>+ } </div>
<div>+ }</div>
<div> return np->grp;</div>
<div> }</div>
<div> }</div>
</div>
<div><br>
</div>
</div>
<div class="gmail_extra"><br clear="all">
<div>Kelvin Chua</div>
<br>
<br>
<div class="gmail_quote">On Mon, Jan 6, 2014 at 7:59 PM, Kelvin
Chua <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:kelchy@gmail.com" target="_blank">kelchy@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">checking the source code, looks like, it's
not being set at all on any of those functions</div>
<div class="gmail_extra"><span class="HOEnZb"><font
color="#888888"><br clear="all">
<div>Kelvin Chua</div>
</font></span>
<div>
<div class="h5">
<br>
<br>
<div class="gmail_quote">On Mon, Jan 6, 2014 at 7:37
PM, Daniel-Constantin Mierla <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,
<div><br>
<br>
On 04/01/14 21:47, Juha Heinanen wrote:<br>
<blockquote class="gmail_quote" style="margin:0
0 0 .8ex;border-left:1px #ccc
solid;padding-left:1ex">
Kelvin Chua writes:<br>
<br>
<blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px
#ccc solid;padding-left:1ex">
is the peer_tag_avp used on
allow_source_address_group?<br>
</blockquote>
based on fast scan of permissions module
source, it appears that<br>
peer_tag_avp is set only by allow_trusted
function.<br>
</blockquote>
</div>
the peer tag avp should be set also for
allow_address() and allow_source_address(). I
don't think it is set for
allow_source_address_group().<br>
<br>
Cheers,<br>
Daniel<span><font color="#888888"><br>
<br>
-- <br>
Daniel-Constantin Mierla - <a
moz-do-not-send="true"
href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
<a moz-do-not-send="true"
href="http://twitter.com/#%21/miconda"
target="_blank">http://twitter.com/#!/miconda</a>
- <a moz-do-not-send="true"
href="http://www.linkedin.com/in/miconda"
target="_blank">http://www.linkedin.com/in/miconda</a></font></span>
<div>
<div><br>
<br>
<br>
_______________________________________________<br>
SIP Express Router (SER) and Kamailio
(OpenSER) - sr-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:sr-users@lists.sip-router.org"
target="_blank">sr-users@lists.sip-router.org</a><br>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></pre>
</body>
</html>