From sa@nkz.delikates-nk.ru  Thu Aug 31 06:06:09 2006
Return-Path: <sa@nkz.delikates-nk.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 0168E16A4DA
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 31 Aug 2006 06:06:09 +0000 (UTC)
	(envelope-from sa@nkz.delikates-nk.ru)
Received: from nkz.delikates-nk.ru (nkz.delikates-nk.ru [81.16.143.102])
	by mx1.FreeBSD.org (Postfix) with ESMTP id F38F543D4C
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 31 Aug 2006 06:06:07 +0000 (GMT)
	(envelope-from sa@nkz.delikates-nk.ru)
Received: from nkz.delikates-nk.ru (localhost [127.0.0.1])
	by nkz.delikates-nk.ru (8.13.6/8.13.6) with ESMTP id k7V6637V004582
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 31 Aug 2006 14:06:04 +0800 (KRAST)
	(envelope-from sa@nkz.delikates-nk.ru)
Received: (from root@localhost)
	by nkz.delikates-nk.ru (8.13.6/8.13.6/Submit) id k7V663Vm004581;
	Thu, 31 Aug 2006 14:06:03 +0800 (KRAST)
	(envelope-from sa)
Message-Id: <200608310606.k7V663Vm004581@nkz.delikates-nk.ru>
Date: Thu, 31 Aug 2006 14:06:03 +0800 (KRAST)
From: Eugene Grosbein <eugen@grosbein.pp.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] ng_bpf(4) example leads to unneeded promiscuos mode activation
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         102719
>Category:       docs
>Synopsis:       [patch] ng_bpf(4) example leads to unneeded promiscuos mode activation
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Aug 31 06:10:12 GMT 2006
>Closed-Date:    
>Last-Modified:  Sat Oct 21 09:30:19 GMT 2006
>Originator:     Eugene Grosbein
>Release:        FreeBSD 6.1-STABLE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD nkz.delikates-nk.ru 6.1-STABLE FreeBSD 6.1-STABLE #0: Wed Aug 16 20:09:18 KRAST 2006 sa@nkz.delikates-nk.ru:/home/obj/home/src/sys/NKZ i386

>Description:
	ng_bpf(4) teaches to use tcpdump(1) to generate raw BPF
        instructions. However, the exact command line does not
	include	'-p' option. This may activate promiscous mode on
	first ethernet interface, if any. This is not needed and
	should not happen.

>How-To-Repeat:
	Use example from bg_bpf(4) manual page and see pair of
	'promiscuous mode enabled/promiscuous mode disabled' messages
	in the kernel log.

>Fix:

--- src/share/man/man4/ng_bpf.4.orig	Sat Feb  5 18:31:31 2005
+++ src/share/man/man4/ng_bpf.4	Thu Aug 31 13:49:15 2006
@@ -170,7 +170,7 @@
 }
 xxENDxx
 
-BPFPROG=`tcpdump -s 8192 -ddd ${PATTERN} | awk -f /tmp/bpf.awk`
+BPFPROG=`tcpdump -s 8192 -i lo0 -p -ddd ${PATTERN} | awk -f /tmp/bpf.awk`
 
 ngctl msg ${NODEPATH} setprogram { thisHook=\\"${INHOOK}\\" \\
   ifMatch=\\"${MATCHHOOK}\\" \\


>Release-Note:
>Audit-Trail:

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/102719
Date: Sat, 21 Oct 2006 13:29:51 +0400

   I'd say this is a bug in tcpdump(1), not a problem in the
 manual page. tcpdump(1) doesn't need an interface to process
 -d option.
 
 -- 
 Totus tuus, Glebius.
 GLEBIUS-RIPN GLEB-RIPE
>Unformatted:
