[SR-Users] tag column on address table

Daniel-Constantin Mierla miconda at gmail.com
Mon Jan 6 13:10:59 CET 2014


for example, allow_source_address() executes next function:

int match_addr_hash_table(struct addr_list** table, unsigned int group,
         ip_addr_t *addr, unsigned int port)
{
     struct addr_list *np;
     str addr_str;
     avp_value_t val;

     addr_str.s = (char*)addr->u.addr;
     addr_str.len = 4;

     for (np = table[perm_hash(addr_str)]; np != NULL; np = np->next) {
         if ( (np->grp == group)
                 && ((np->port == 0) || (np->port == port))
                 && ip_addr_cmp(&np->addr, addr)) {

             if (tag_avp.n && np->tag.s) {
                 val.s = np->tag;
                 if (add_avp(tag_avp_type|AVP_VAL_STR, tag_avp, val) != 0) {
                     LM_ERR("setting of tag_avp failed\n");
                     return -1;
                 }
             }

             return 1;
         }
     }

     return -1;
}

... and I see an avp being added over the tag_avp. Is it another one?

Daniel
On 06/01/14 12:59, Kelvin Chua wrote:
> checking the source code, looks like, it's not being set at all on any 
> of those functions
>
> Kelvin Chua
>
>
> On Mon, Jan 6, 2014 at 7:37 PM, Daniel-Constantin Mierla 
> <miconda at gmail.com <mailto:miconda at gmail.com>> wrote:
>
>     Hello,
>
>
>     On 04/01/14 21:47, Juha Heinanen wrote:
>
>         Kelvin Chua writes:
>
>             is the peer_tag_avp used on allow_source_address_group?
>
>         based on fast scan of permissions module source, it appears that
>         peer_tag_avp is set only by allow_trusted function.
>
>     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().
>
>     Cheers,
>     Daniel
>
>     -- 
>     Daniel-Constantin Mierla - http://www.asipto.com
>     http://twitter.com/#!/miconda <http://twitter.com/#%21/miconda> -
>     http://www.linkedin.com/in/miconda
>
>
>
>     _______________________________________________
>     SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing
>     list
>     sr-users at lists.sip-router.org <mailto:sr-users at lists.sip-router.org>
>     http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
>

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140106/dca00907/attachment-0001.html>


More information about the sr-users mailing list