Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Jan 1999 21:39:22 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        jkb@best.com (Jan B. Koum)
Cc:        dmaddox@conterra.com, net@FreeBSD.ORG
Subject:   Re: Why does tcpdump not see tun0 when loaded as a kld?
Message-ID:  <199901290539.VAA09271@bubba.whistle.com>
In-Reply-To: <19990128193542.C25932@best.com> from "Jan B. Koum" at "Jan 28, 99 07:35:42 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199901290539.VAA09271>