Date: Mon, 13 Jun 2005 14:58:08 -0500 (CDT) From: Alan Amesbury <amesbury@umn.edu> To: FreeBSD-gnats-submit@FreeBSD.org Subject: i386/82207: tcpslice incorrectly handles dates where year is >=2000 Message-ID: <20050613195808.C84906D44C@paulaner.oitsec.umn.edu> Resent-Message-ID: <200506132000.j5DK0h8E040522@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 82207 >Category: i386 >Synopsis: tcpslice incorrectly handles dates where year is >=2000 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 13 20:00:43 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Alan Amesbury >Release: FreeBSD 5.3-RELEASE-p15 i386 >Organization: University of Minnesota >Environment: System: FreeBSD paulaner.oitsec.umn.edu 5.3-RELEASE-p15 FreeBSD 5.3-RELEASE-p15 #2: Mon May 23 12:09:49 CDT 2005 root@paulaner.oitsec.umn.edu:/usr/obj/usr/src/sys/OITSEC-5_3-S i386 >Description: tcpslice(1) lists three ways to enter time ranges. One method allows for specifying dates in a more-or-less human-readable form, using the letters "ymdhmsu" with numerical arguments to specifcy year, month, date, hour, minute, second, and fractional second. The manpage lists this as an example for 765400 usec after 8:51PM PDT, Sept. 25, 1990: 90y9m25d20h51m38s765400u When given a date/time equal to or greater than 0000 hours on January 1, 2000, tcpslice doesn't parse it correctly. >How-To-Repeat: tcpslice provides the '-dR' and '-dr' mechanisms for verifying date arguments passed to it. When used with dates prior to 0000 hours on January 1, 2000, it seems to work: amesbury@mrtoad % tcpslice -dr 99y12m31d20h00m00s000000u 99y12m31d23h59m59s999999u dummy_pcap_file dummy_pcap_file Tue Jun 7 13:47:58 2005 Mon Jun 13 12:57:28 2005 start Fri Dec 31 14:00:00 1999 stop Fri Dec 31 17:59:59 1999 amesbury@mrtoad % tcpslice -dR 99y12m31d20h00m00s000000u 99y12m31d23h59m59s999999u dummy_pcap_file dummy_pcap_file 1118170078.412911 1118685448.579029 start 946670400.000000 stop 946684799.999999 However, specifying a date on or after January 1st, 2000, does not work correctly, as shown in these three examples: amesbury@mrtoad % tcpslice -dr 99y12m31d20h00m00s000000u 00y01m01d00h00m00s000000u dummy_pcap_file dummy_pcap_file Tue Jun 7 13:47:58 2005 Mon Jun 13 12:57:28 2005 start Fri Dec 31 14:00:00 1999 stop Wed Dec 31 18:00:00 1969 amesbury@mrtoad % tcpslice -dr 99y12m31d20h00m00s000000u 00y01m01d01h01m01s000000u dummy_pcap_file dummy_pcap_file Tue Jun 7 13:47:58 2005 Mon Jun 13 12:57:28 2005 start Fri Dec 31 14:00:00 1999 stop Wed Dec 31 19:01:01 1969 amesbury@mrtoad % tcpslice -dr 99y12m31d20h00m00s000000u 2000y01m01d01h01m01s000000u dummy_pcap_file dummy_pcap_file Tue Jun 7 13:47:58 2005 Mon Jun 13 12:57:28 2005 start Fri Dec 31 14:00:00 1999 stop Wed Dec 31 19:01:01 1969 >Fix: The version in ports (net/tcpslice, v2002.04.15) doesn't appear to suffer from this problem, so using that is one possible workaround. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050613195808.C84906D44C>