Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jan 1999 16:26:03 +1100
From:      Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/9507: tcpslice(8) is not Y2K compliant
Message-ID:  <99Jan15.162528est.40330@border.alcanet.com.au>

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

>Number:         9507
>Category:       bin
>Synopsis:       tcpslice(8) is not Y2K compliant
>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:   Thu Jan 14 21:30:04 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Peter Jeremy
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Alcatel Australia
>Environment:

	

>Description:

tcpslice(8) uses a raw tm_year and will therefore display 100y01m01d...
for 2000-JAN-01.  For compatibility, use a two-digit year until 2000.

>How-To-Repeat:

Code inspection

>Fix:
	
--- /3.0/src/usr.sbin/tcpdump/tcpslice/tcpslice.c	Tue Jan 20 18:30:27 1998
+++ ./tcpslice.c	Fri Jan 15 14:46:37 1999
@@ -574,6 +574,8 @@
 
 	    case TIMESTAMP_PARSEABLE:
 		t = localtime((time_t *) &timestamp->tv_sec);
+		if (t->tm_year >= 100)
+		    t->tm_year += 1900;
 		sprintf( buf, "%02dy%02dm%02dd%02dh%02dm%02ds%06ldu",
 			t->tm_year, t->tm_mon + 1, t->tm_mday, t->tm_hour,
 			t->tm_min, t->tm_sec, timestamp->tv_usec );
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Jan15.162528est.40330>