[nos-bbs] Update - Timer issues in JNOS
Maiko Langelaar
maiko at pcs.mb.ca
Tue Aug 3 13:45:33 EDT 2010
Good day,
The msclock() function returns a signed integer, which we know to
have an upper limit of 2 147 483 647. With some debugging info, and
some calculations, it would appear that msclock() will return a value
of 2 178 000 000 after roughly 25 days - exceeding the upper limit.
In unix.c - ding() - calculation of clock results in this :
24 days - clock 38016000
25 days - clock -38490314
If an unsigned integer was used instead, we would see this instead :
24 days - clock 38016000
25 days - clock 39600000
Unfortunately msclock() returning a signed integer also affects a
few other areas of JNOS for linux - things like the 'rtt' value used
in tcp, ip, and ax25 traffic, timeouts in the ftp client, dns queries,
and hop checks. So it's not just a matter of redefining msclock() to
return an unsigned integer.
To be honest with you, I'm not so sure I like the way the whole clock
thing is done to begin with - seems like alot of work just so that we
can keep track of when JNOS was first started ? Might change this ...
Anyways, it's clear what is going on here. I'll have a fix out shortly.
Maiko Langelaar / VE4KLM
More information about the nos-bbs
mailing list