From owner-freebsd-ports Sun Nov 11 13: 0: 6 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D9DDD37B419 for ; Sun, 11 Nov 2001 13:00:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fABL01Q40783; Sun, 11 Nov 2001 13:00:01 -0800 (PST) (envelope-from gnats) Received: from hammy.lonestar.org (hammy.lonestar.org [206.138.224.67]) by hub.freebsd.org (Postfix) with ESMTP id 9E0FF37B405 for ; Sun, 11 Nov 2001 12:50:17 -0800 (PST) Received: from localhost (2084 bytes) by hammy.lonestar.org via sendmail with P:stdio/R:bind_hosts/T:inet_zone_bind_smtp (sender: ) (ident using unix) id for ; Sun, 11 Nov 2001 14:50:06 -0600 (CST) (Smail-3.2.0.96 1997-Jun-2 #110 built 2000-Jan-16) Message-Id: Date: Sun, 11 Nov 2001 14:50:06 -0600 (CST) From: Gordon Burditt Reply-To: Gordon Burditt To: FreeBSD-gnats-submit@freebsd.org Cc: gordon@hammy.lonestar.org X-Send-Pr-Version: 3.113 Subject: ports/31920: sniffit does not detect packets on some interfaces Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31920 >Category: ports >Synopsis: sniffit does not detect packets on some interfaces >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Nov 11 13:00:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Gordon Burditt >Release: FreeBSD 4.4-RELEASE i386 >Organization: >Environment: System: FreeBSD hammy.lonestar.org 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Sun Nov 4 18:05:35 CST 2001 gordon@hammy.lonestar.org:/scratch5/i386-obj/usr/src/sys/HAMMY i386 >Description: The 'sniffit' port does not detect packets on some interfaces because of an out-of-range array access to determine the packet header length. >How-To-Repeat: sniffit -I -F ed0 on a machine with an ed0 interface. Also fails on de0, tun0, and lo0. Probably fails on ppp0. >Fix: Apply the following patch (after patch-03 in the port). This patch is specific to FreeBSD (all of the affected code is inside an ifdef for FreeBSD). HEADSIZE[] needs to have dimension at least NETDEV_NR, with entries corresponding to entries in NETDEV[]. Index: sn_data.h *** sn_data.h.old Sat Nov 10 20:18:21 2001 --- sn_data.h Sat Nov 10 20:32:54 2001 *************** *** 40,46 **** */ #define NETDEV_NR 6 char *NETDEV[]={"fxp","de","ed","ppp","tun","lo"}; ! int HEADSIZE[]={14}; #endif #ifdef BSDI /* ppp: 4 or 0 ? */ --- 40,46 ---- */ #define NETDEV_NR 6 char *NETDEV[]={"fxp","de","ed","ppp","tun","lo"}; ! int HEADSIZE[]={14, 14, 14, 4, 4, 4}; #endif #ifdef BSDI /* ppp: 4 or 0 ? */ This patch has been tested for de, ed, tun, and lo. It should still work for fxp as this entry hasn't changed, but I don't have one to test. The entry for ppp is a guess but I expect it to be the same as tun. Gordon L. Burditt >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message