[SR-Users] Issues with keepalive_timeout

Alex Balashov abalashov at evaristesys.com
Thu Feb 20 01:23:00 CET 2014


Okay, so maybe someone who knows the usrloc code better can correct me 
on this, but I get the impression that the part of the code that ages 
the contact out if a keepalive reply has not been received is dependent 
on nat_bflag being set, regardless of the value of the 'ping_nated_only' 
modparam.

Back to get_all_mem_ucontacts():

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

                    if(ul_keepalive_timeout>0 && c->last_keepalive>0)
                     {
                         if((c->cflags & nat_bflag) != 0 && c->sock!=NULL
                                 && c->sock->proto==PROTO_UDP)
                         {
                             if(c->last_keepalive+ul_keepalive_timeout < 
tnow)
                             {
                                 /* set contact as expired in 10s */
                                 if(c->expires > tnow + 10)
                                     c->expires = tnow + 10;
                                 continue;
                             }
                         }
                     }


-- 
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