From owner-freebsd-net Thu Jan 28 21:40:35 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA24289 for freebsd-net-outgoing; Thu, 28 Jan 1999 21:40:35 -0800 (PST) (envelope-from owner-freebsd-net@FreeBSD.ORG) Received: from whistle.com (s205m131.whistle.com [207.76.205.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA24283 for ; Thu, 28 Jan 1999 21:40:32 -0800 (PST) (envelope-from archie@whistle.com) Received: (from smap@localhost) by whistle.com (8.7.5/8.6.12) id VAA17079; Thu, 28 Jan 1999 21:39:28 -0800 (PST) Received: from bubba.whistle.com( 207.76.205.7) by whistle.com via smap (V2.0) id xma017075; Thu, 28 Jan 99 21:39:22 -0800 Received: (from archie@localhost) by bubba.whistle.com (8.8.7/8.6.12) id VAA09271; Thu, 28 Jan 1999 21:39:22 -0800 (PST) From: Archie Cobbs Message-Id: <199901290539.VAA09271@bubba.whistle.com> Subject: Re: Why does tcpdump not see tun0 when loaded as a kld? In-Reply-To: <19990128193542.C25932@best.com> from "Jan B. Koum" at "Jan 28, 99 07:35:42 pm" To: jkb@best.com (Jan B. Koum) Date: Thu, 28 Jan 1999 21:39:22 -0800 (PST) Cc: dmaddox@conterra.com, net@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Jan B. Koum writes: > > # tcpdump -i tun0 > > tcpdump: tun0: Device not configured > > > > Does tun0 _have_ to be compiled in statically for tcpdump to see > > it? > > Because bpf attaches to devices during the boot time. Look in > /usr/src/sys/net/bpf.c around line 1239 in bpfattach() > > Can someone confirm since I am not sure myself if that is true? The problem (as I understand it) is that for "if_tun.ko" to support BPF it needs to call bpfattach(), among other functions. If you don't have BPF compiled into the kernel, then the link will fail. So the module takes the conservative stance by not including it. This is easy to fix by the way. Go to /sys/modules/if_tun, edit the Makefile to change the definition of NBPFILTER, and type "make all install". -Archie ___________________________________________________________________________ Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message