[SR-Users] Issues with keepalive_timeout

Alex Balashov abalashov at evaristesys.com
Thu Feb 20 01:14:24 CET 2014

Hello Kristian,

On 02/19/2014 06:51 PM, Kristian Kielhofner wrote:

> It seems that with modparam("nathelper", "ping_nated_only", 0) set my
> configuration should work without always also setting nat_bflag (as
> that is used in various other places currently).

Seemingly, yes. From nh_timer:

     rval = ul.get_all_ucontacts(buf, cblen, 
         ((unsigned int)(unsigned 

The implication being that if ping_nated_only is < 1, contacts to ping 
are not filtered by the usrloc NAT flag. It did strike me as interesting 
that the usrloc API field is called 'nat_flag', but the usrloc modparam 
is called 'nat_bflag', but usrloc.c clearly reveals that they are one 
and the same:

    unsigned int  nat_flag;   /*! nat_flag module parameter */
    api->nat_flag   = nat_bflag;

And the filter in get_all_mem_ucontacts() does apply the flags argument:

    if ((c->cflags & flags) != flags)

But it seems to me that it might not match if there are any other UL 
flags set besides the nat_bflag, e.g.

    #define POWPOW (1 << 1)
    #define PINGPONG (1 << 2)

    int flags = 0;

    flags |= PINGPONG;

    if((flags & POWPOW) != POWPOW)

    sasha at tambourine:~$ ./ns

Are there other UL contact flags that could be in use here and breaking 
this comparison in get_all_mem_ucontacts()?

Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

More information about the sr-users mailing list