From nobody@FreeBSD.org  Fri May 25 17:29:23 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 40FC437B422
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 25 May 2001 17:29:19 -0700 (PDT)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f4Q0TJW38398;
	Fri, 25 May 2001 17:29:19 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200105260029.f4Q0TJW38398@freefall.freebsd.org>
Date: Fri, 25 May 2001 17:29:19 -0700 (PDT)
From: jswank@colltech.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: hping port only supports small subset of ethernet drivers
X-Send-Pr-Version: www-1.0

>Number:         27649
>Category:       ports
>Synopsis:       hping port only supports small subset of ethernet drivers
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 25 17:30:01 PDT 2001
>Closed-Date:    Mon Jun 4 06:48:56 PDT 2001
>Last-Modified:  Mon Jun 04 06:49:41 PDT 2001
>Originator:     Jason Swank
>Release:        4.3-STABLE
>Organization:
Collective Technologies
>Environment:
FreeBSD top 4.3-STABLE FreeBSD 4.3-STABLE #3: Sun Apr 22 15:14:45 EDT 
2000 root@top:/usr/obj/usr/src/sys/TOP  i386
>Description:
The current port for hping2 (security/hping) only supports a small
subset of possible ethernet drivers.  Running the resulting binary
returns an error when running with an unsupported NIC.

Sample session:

# /usr/local/sbin/hping 192.168.0.1
[main] physical layer header size unknown

>How-To-Repeat:
Compile and attempt to run hping using an unsupported NIC.
>Fix:
Further patch getlhs.c in the source distribution to include support
for other ethernet devices.  Below is a unified diff for that file to
include support for additional NICs (I'm sending it to the maintainer
as well since it will probably be garbled via the PR web interface).

--- getlhs.c            Fri May 25 19:20:43 2001
+++ getlhs.c.orig       Thu Jul  6 13:06:10 2000
@@ -74,5 +74,4 @@
             ||   strstr(ifname, "ed")
             ||   strstr(ifname, "ne")
-            ||   strstr(ifname, "xe")  /* Xircom */
             ||   strstr(ifname, "xl")  /* 3com */
             ||   strstr(ifname, "vx")  /* 3com (older model) */
@@ -87,16 +86,5 @@
             ||   strstr(ifname, "tl")  /* Compaq Netelligent 10/10+TNETE100 */
             ||   strstr(ifname, "tx")  /* SMC 9432TX */
-            ||   strstr(ifname, "wb")  /* Winbond W89C840F chip */
-             ||   strstr(ifname, "an")  /* Aironet 4500/4800 */
-             ||   strstr(ifname, "awi") /* PRISM I IEEE 802.11b wireless NIC */
-             ||   strstr(ifname, "dc")  /* DEC/Intel 21143 and workalikes */
-             ||   strstr(ifname, "de")  /* Digital Equipment DC21040 */
-             ||   strstr(ifname, "pcn") /* AMD Am79C79x */
-             ||   strstr(ifname, "sis") /* SiS 900/SiS 7016 */
-             ||   strstr(ifname, "ste") /* Sundance ST201 */
-             ||   strstr(ifname, "vr")  /* VIA Rhine, Rhine II */
-             ||   strstr(ifname, "vx")  /* 3com (older model) */
-             ||   strstr(ifname, "wi")  /* WaveLAN/IEEE 802.11 wireless NICs */
-             ||   strstr(ifname, "wx"))  /* Intel Gigabit "Wiseman" */
+            ||   strstr(ifname, "wb")) /* Winbond W89C840F chip */
        {
                linkhdr_size = ETHHDR_SIZE;

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: roam 
State-Changed-When: Mon Jun 4 06:48:56 PDT 2001 
State-Changed-Why:  
Mostly fixed by the maintainer's patch in PR ports/27874, which was 
just committed. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=27649 
>Unformatted:
