Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 107994

Summary: tcpslice doesn't work properly for packets captured in years > 2000
Product: Gentoo Linux Reporter: Paul Kronenwetter <kronenpj>
Component: Current packagesAssignee: Gentoo Netmon project <netmon>
Status: RESOLVED FIXED    
Severity: normal Keywords: Inclusion
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch that helps my situation.

Description Paul Kronenwetter 2005-10-03 09:47:53 UTC
The "heuristic" used to determine 4-digit years is too simplistic to handle
packets captured in this millenium.

I have a patch that seems to help, but I've only done some splits with it.

Reproducible: Always
Steps to Reproduce:
1. Capture packets with tcpdump, write to file "foo"
2. Use tcpsplit -dt +1m +2m foo
3. Find the follwing type output:

Actual Results:  
foo 105y09m29d08h53m37s156123u      105y10m03d08h11m03s308411u
start   70y09m29d08h54m37s156123u
stop    70y09m29d08h59m37s156123u

Expected Results:  
foo 0105y09m29d08h53m37s156123u     0105y10m03d08h11m03s308411u
start   0105y09m29d08h54m37s156123u
stop    0105y09m29d08h59m37s156123u


Portage 2.0.51.22-r2 (default-linux/x86/2005.1, gcc-3.3.6, glibc-2.3.5-r1,
2.6.13-suspend2-r4 i686)
=================================================================
System uname: 2.6.13-suspend2-r4 i686 Mobile Intel(R) Pentium(R) 4 - M CPU 2.20GHz
Gentoo Base System version 1.6.13
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.5-r2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.18-r1
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mcpu=i586 -march=i586 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /home/httpd /lib/modules /usr/kde/2/share/config
/usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown
/usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/export/home1/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distcc distlocks sandbox sfperms strict
userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo
http://mirror.datapipe.net/gentoo http://open-systems.ufl.edu/mirrors/gentoo
http://mirrors.tds.net/gentoo"
LANG="en_US"
PKGDIR="/export/home1/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="x86 3dfx X aalib acpi alsa apache2 apm arts avi berkdb bitmap-fonts bonobo
cdr crypt cscope cups curl dbus dvd eds emboss encode esd ethereal fam firefox
flac font-server foomaticdb fortran gd gdbm gif gimp gimpprint gnome gphoto2 gpm
gps gstreamer gtk gtk2 gtkhtml guile hal ieee1394 imagemagick imlib ipv6 java
jce jpeg junit ldap libg++ libwww mad mbox mikmod milter mmx motif mozsvg mp3
mpeg mysql ncurses nls no-htdocs nsplugin ogg oggvorbis openal opengl oss pam
pcmcia pda pdflib perl plotutils plugin png postgres ppds python qt quicktime
readline samba scanner sdl server shape slang smartcard softmmu speex spell
sqlite sse ssl svg svga tcltk tcpd tetex tiff truetype truetype-fonts trusted
type1-fonts usb userlocales vorbis win32codecs xine xml xml2 xmms xv zlib
userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 Paul Kronenwetter 2005-10-03 09:49:30 UTC
Created attachment 69790 [details, diff]
Patch that helps my situation.

This patch hasn't been extensively tested, caveat patchor.
Comment 2 Marcelo Goes (RETIRED) gentoo-dev 2006-01-17 09:31:28 UTC
Hello,

I just bumped this package to 1.2_alpha2, which seems not to have this problem anymore (thanks for the patch anyway!).

Please reopen if you have any problems.