Date: Mon, 06 Dec 2004 15:32:13 +0100 From: Gerald Heinig <gheinig@syskonnect.de> To: freebsd-net@freebsd.org Subject: ping counter overflow Message-ID: <41B46D6D.7080702@syskonnect.de>
next in thread | raw e-mail | index | archive | help
Hi all, I've run into a possible bug in ping(8) while investigating a strange duplicate packet effect in our driver. The effect shows up on other drivers and I believe it's due to a counter overflow in ping. Basically, leave ping -f on a gigabit link for a few days (for medium to large values of "a few", ie. at least 3 or 4). Stop the ping and get lots of duplicate packets. I changed the 5 counter variables (nmissedmax, npackets, nreceived, nrepeats, ntransmitted) to short (from long) to reduce the time taken to overflow and managed to get the effect very easily - it takes about 3 seconds on a gigabit link. Changing these variables to their unsigned counterparts solved the problem. My question: shouldn't these counters be unsigned? (ie. unsigned long, instead of long) Regards, Gerald
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41B46D6D.7080702>