From dan@dan.emsphone.com  Fri Oct  2 09:54:30 1998
Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA29242
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 2 Oct 1998 09:54:27 -0700 (PDT)
          (envelope-from dan@dan.emsphone.com)
Received: (from dan@localhost)
	by dan.emsphone.com (8.9.1/8.9.1) id LAA02996;
	Fri, 2 Oct 1998 11:54:08 -0500 (CDT)
Message-Id: <199810021654.LAA02996@dan.emsphone.com>
Date: Fri, 2 Oct 1998 11:54:08 -0500 (CDT)
From: Dan Nelson <dnelson@emsphone.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: tcpdump can't use NIS ether maps
X-Send-Pr-Version: 3.2

>Number:         8130
>Category:       bin
>Synopsis:       tcpdump can't use NIS ether maps (patch included)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct  2 10:00:00 PDT 1998
>Closed-Date:    Fri Oct 2 17:45:08 PDT 1998
>Last-Modified:  Fri Oct  2 17:45:29 PDT 1998
>Originator:     Dan Nelson
>Release:        FreeBSD 2.2.7-STABLE i386
>Organization:
Executive Marketing Services, Inc.
>Environment:

FreeBSD dan.emsphone.com 2.2.7-STABLE FreeBSD 2.2.7-STABLE #0: Sat Aug  8 15:03:34 CDT 1998     dan@dan.emsphone.com:/usr/src/sys/compile/DAN  i386

>Description:

	A configuration define is wrong, causing tcpdump to think that
the ether_ntohost function doesn't exist.  It ends up reading
/etc/ethers directly, which is bad if your ether tables are distributed
via NIS.

>How-To-Repeat:

put your /etc/ethers file in NIS, run tcpdump -e, notice that all your
ethernet addresses aren't resolved.

>Fix:
	
Index: tcpdump/Makefile
===================================================================
RCS file: /home/ncvs/src/usr.sbin/tcpdump/tcpdump/Makefile,v
retrieving revision 1.14.2.1
diff -u -r1.14.2.1 Makefile
--- Makefile	1997/12/31 21:51:55	1.14.2.1
+++ Makefile	1998/07/23 19:34:49
@@ -2,7 +2,7 @@
 
 PROG=	tcpdump
 CFLAGS+=-DHAVE_FCNTL_H=1 -DHAVE_NET_SLIP_H=1 -DTIME_WITH_SYS_TIME=1 \
-	-DHAVE_ETHER_NTOA=1 -DHAVE_SETLINEBUF=1 -DSTDC_HEADERS=1 \
+	-DHAVE_ETHER_NTOHOST=1 -DHAVE_SETLINEBUF=1 -DSTDC_HEADERS=1 \
 	-DRETSIGTYPE=void -DRETSIGVAL= -DHAVE_SOCKADDR_SA_LEN=1 \
 	-DHAVE_TM_GMTOFF=1 -DLBL_ALIGN=1 -DPPP -DHAVE_FDDI
 MAN1=	tcpdump.1


(the code doesn't check for ETHER_NTOA at all, so it must have been
typoed at some point)


	-Dan Nelson
	dnelson@emsphone.com
>Release-Note:
>Audit-Trail:

From: Bill Fenner <fenner@parc.xerox.com>
To: Dan Nelson <dnelson@emsphone.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: bin/8130: tcpdump can't use NIS ether maps 
Date: Fri, 2 Oct 1998 11:42:04 PDT

 Thanks for the report.  It's actually a bug in the tcpdump configure
 script, which I will report to LBL.
 
   Bill
State-Changed-From-To: open->closed 
State-Changed-By: fenner 
State-Changed-When: Fri Oct 2 17:45:08 PDT 1998 
State-Changed-Why:  
Patch applied to -current and -stable. 
Thanks! 
>Unformatted:
Dan Nelson
