kern/94249: Inconsistent use of time_second & time_uptime in
in_rmx.c
Dave Thompson
davetho at cisco.com
Wed Mar 8 14:50:06 PST 2006
>Number: 94249
>Category: kern
>Synopsis: Inconsistent use of time_second & time_uptime in in_rmx.c
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 08 22:50:04 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Dave Thompson
>Release: 7.0_CURRENT
>Organization:
Cisco Systems
>Environment:
FreeBSD stack 7.0-CURRENT FreeBSD 7.0-CURRENT #56: Wed Mar 8 21:13:43 CST 2006 davetho at davetho-freebsd.cisco.com:/local/davetho/cvs/csi/freebsd7_xen3/src/sys/i386-xen/compile/XENCONF i386
>Description:
The function in_rtqtimo() of netinet/in_rmx.c uses time_second to set the starting value of arg.nextstop. When the rnh tree is walked, the nextstop arg can then be changed in in_rtqkill() to rt->rt_rmx.rmx_expire which is set using time_uptime. On my system (with the DIAGNOSTIC option turned on), this causes the tvtohz() call at the end of the in_rtqtimo() function to display a console message that the atv.tv_sec value is negative. This is negative because on my system the time_second value is a very large value and the time_uptime is a small value.
>How-To-Repeat:
Turn the DIAGNOSTIC option on and wait for the in_rtqtimo() function to run.
>Fix:
Change the references to time_second in in_rtqtimo() of netinet/in_rmx.c to use time_uptime instead. This will be consistent with the use of time_uptime in the other related functions.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list