[Serusers] nathelper and natping interval
Klaus Darilion
klaus.mailinglists at pernau.at
Sun Feb 1 19:38:31 CET 2004
I always use the web-cvs ('download tarball' at the bottom of the page)
to download ser. Maybe there was a bug which was fixed in the cvs, but
not in the ftp package.
klaus
Vitaly Nikolaev wrote:
>
> That is very strange but in my 0.8.12 thet i get from ftp no
> ping_nated_only at all in nathelper.c plus it not sending flag parameter
> to usrloc/dlist.c gett_all_ucontacts nd it use something weird fo compare
> and thus ha sno result
>
>
>
> On Sun, 1 Feb 2004, Klaus Darilion wrote:
>
>
>>Hi!
>>
>>I'm using the 0.8.12_stable from cvs from 10. december 2003 and pinging
>>works fine.
>>
>>regards,
>>klaus
>>
>>
>>
>>...
>># special NAT flag indicates that a registered client is behind NAT
>>modparam("registrar", "nat_flag", 6)
>>...
>># -- nathelper params --
>>modparam("nathelper", "natping_interval", 60)
>>modparam("nathelper", "ping_nated_only", 1)
>>
>>....
>>
>>
>>Vitali Nikolaev wrote:
>>
>>
>>>Hello,
>>>
>>>I have problem with natping_interval.. it is not pinging at all and
>>>look like it just doesnot aware that I have something registered
>>>
>>>
>>>I use lates table release: 0.8.12
>>>
>>>I added some more debugging in nathelper.c to timer function:
>>>
>>> DBG("DEBUG: nathelper buff != NULL\n");
>>> cp = buf;
>>> while (1) {
>>> memcpy(&(c.len), cp, sizeof(c.len));
>>> if (c.len == 0) {
>>> LOG(L_ERR, "ERROR: nathelper::c.len == 0\n");
>>> break;
>>> }
>>>
>>> and can see that it break from the loop with c.len = 0. but when i
>>> look at location table in mysql there is few devices registered.
>>> probably something with ul_get_all_ucontact from usrloc..
>>>
>>> please advise
>>>
>>>
>>>
>>>
>>>here is config:
>>>
>>>
>>>
>>>loadmodule "/usr/local/lib/ser/modules/sl.so"
>>>loadmodule "/usr/local/lib/ser/modules/tm.so"
>>>loadmodule "/usr/local/lib/ser/modules/rr.so"
>>>loadmodule "/usr/local/lib/ser/modules/auth.so"
>>>loadmodule "/usr/local/lib/ser/modules/auth_db.so"
>>>loadmodule "/usr/local/lib/ser/modules/mysql.so"
>>>loadmodule "/usr/local/lib/ser/modules/auth_mssql.so"
>>>loadmodule "/usr/local/lib/ser/modules/usrloc.so"
>>>loadmodule "/usr/local/lib/ser/modules/textops.so"
>>>loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
>>>loadmodule "/usr/local/lib/ser/modules/registrar.so"
>>>loadmodule "/usr/local/lib/ser/modules/nathelper.so"
>>>loadmodule "/usr/local/lib/ser/modules/exec.so"
>>>
>>>modparam("nathelper", "natping_interval", 10)
>>>modparam("registrar", "nat_flag", 6)
>>># modparam("nathelper", "ping_nated_only", 1) # Ping only clients behind NAT
>>>
>>>
>>>modparam("auth_db", "db_url","sql://ser:XXX@localhost/ser")
>>>modparam ("usrloc", "db_mode", 1)
>>>modparam("usrloc", "use_domain", 0)
>>>modparam("usrloc", "db_url", "sql://ser:XXX@localhost/ser")
>>>modparam("rr", "enable_full_lr", 1)
>>>
>>> force_rport();
>>> fix_nated_contact();
>>> setflag(6); # Mark as natted all clients
>>>
>>> if (!(method=="REGISTER")) record_route(); # 1=loose routing
>>> # loose-route processing
>>> if (loose_route()) {
>>> log(1, "LOOSE ROUTE\n");
>>> t_relay();
>>> break;
>>> };
>>> if(!uri==myself) {
>>> log(1, "URI!=myself");
>>> t_relay();
>>> break;
>>> };
>>>
>>>
>>> if (method=="REGISTER") {
>>> log(1, "REGISTER REQUEST RECEIVED\n");
>>> if (!mssql_authorize("209.227.183.21", "subscriber")) {
>>> log(1, "AUTH FAILED, REQUESTED\n");
>>> www_challenge("", "1");
>>> break;
>>> };
>>> log(1, "AUTH OK, REGISTER\n");
>>> save("location");
>>> break;
>>> };
>>>
>>> .....
>>>
>>>
>>>
>>
>
>
More information about the sr-users
mailing list