NetBSD Problem Report #9929

Received: (qmail 8495 invoked from network); 19 Apr 2000 02:58:35 -0000
Message-Id: <>
Date: Wed, 19 Apr 2000 11:58:30 +0900 (JST)
Subject: pcap_lookupdev picks up interfaces that are not attached to BPF
X-Send-Pr-Version: 3.95

>Number:         9929
>Category:       lib
>Synopsis:       pcap_lookupdev picks up interfaces that are not attached to BPF
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 19 02:59:00 +0000 2000
>Last-Modified:  Tue Jun 06 02:03:59 +0000 2000
>Originator:     Jun-ichiro itojun Hagino
>Release:        1.4X
NetBSD 1.4X NetBSD 1.4X (STARFRUIT) #182: Mon Apr 17 00:15:03 JST 2000 i386

	from manpage for pcap_lookupdev(3) :
 >       pcap_lookupdev()  returns  a  pointer  to a network device
 >       suitable for use with  pcap_open_live()  and  pcap_lookup-
 >       net().   If there is an error, NULL is returned and errbuf
 >       is filled in with with an appropriate error message.

	however, pcap_lookupdev() picks up interfaces that do not call
	bpfattach().  it looks unsuitable for me to pick up an interface
	that will fail on pcap_open_live().

	on laptop,
	# tcpdump -n
	tcpdump will pick up eon0 as interface, and since eon0 does not
	call bpfattach, it will fail.

	try calling pcap_open_live() in pcap_lookupdev() loop, return only if
	pcap_open_live() is successful.

	the bug is actually from LBL libpcap.  we should fix it for libpcap in (where libpcap is maintained now) and then bring it
	back to netbsd-current.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD:,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.