From owner-freebsd-net@FreeBSD.ORG Wed Jan 21 01:11:28 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50BC816A4CE for ; Wed, 21 Jan 2004 01:11:28 -0800 (PST) Received: from mailgw.servicefactory.se (mailgw.servicefactory.se [192.71.33.33]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C6D543D1D for ; Wed, 21 Jan 2004 01:11:26 -0800 (PST) (envelope-from xfree@bulow.mine.nu) Received: from ark.servicefactory.se (ark.servicefactory.se [192.71.33.5]) i0L9BNw21225 for ; Wed, 21 Jan 2004 10:11:24 +0100 (CET) Received: from bulow.mine.nu (ark.servicefactory.se [192.71.33.5]) by ark.servicefactory.se (8.12.9/8.12.6) with ESMTP id i0L99xmP063490 for ; Wed, 21 Jan 2004 10:10:00 +0100 (CET) (envelope-from xfree@bulow.mine.nu) Message-ID: <400E4239.7080708@bulow.mine.nu> Date: Wed, 21 Jan 2004 10:11:21 +0100 From: Jonas Bulow User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6b) Gecko/20031218 X-Accept-Language: en-us, en, sv MIME-Version: 1.0 To: freebsd-net@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: netgraph: ng_eiface and bpf gives duplicate packets X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2004 09:11:28 -0000 Hi, Using bpf with ng_eiface results in duplication of all incoming packets. The duplicated packet is only "visible" on the bpf tap and the ngeth interface works as expected besides this behaviour with bpf. The following examplifies the problem: (pasted from my memory) ngctl -f- < tcpdump: WARNING: ngeth0: no IPv4 address assigned tcpdump: listening on ngeth0 09:53:38.200941 192.168.2.6 > 192.36.125.18: icmp: echo request 09:53:38.200949 192.168.2.6 > 192.36.125.18: icmp: echo request ^C 2 packets received by filter 0 packets dropped by kernel "netstat -i -I ngeth0" shows only one incoming packet. If I attach a ng_tee between the fxp's lower and upper hook (ng_ether) and then attache the eif0 ether hook to correct tap on the tee, I see the smae behaviour but can also se that a tcpdump on fxp0 show only one packet. Any hints on what's wrong? This problem occurs on a late FreeBSD 4.9-STABLE. /jonas