Date: Sun, 11 Nov 2001 14:50:06 -0600 (CST) From: Gordon Burditt <gordon@hammy.lonestar.org> To: FreeBSD-gnats-submit@freebsd.org Cc: gordon@hammy.lonestar.org Subject: ports/31920: sniffit does not detect packets on some interfaces Message-ID: <m1631YM-0001dGC@hammy.lonestar.org>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m1631YM-0001dGC>