Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2006 22:47:32 GMT
From:      Dave Thompson <davetho@cisco.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/94249: Inconsistent use of time_second & time_uptime in in_rmx.c
Message-ID:  <200603082247.k28MlW5e044627@www.freebsd.org>
Resent-Message-ID: <200603082250.k28Mo5Y8067863@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603082247.k28MlW5e044627>