Bug 21391

Summary: WARNING messages occur when bpf is used with DEVFS in -current
Product: Base System Reporter: Tony Fleisher <takhus>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.0-CURRENT   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Tony Fleisher 2000-09-19 06:50:00 UTC
	
The following error repeatedly occurrs under -current anytime a 
program opened the bpf device:
          
WARNING: Driver mistake: repeat make_dev("bpf0")

The problem seems to be caused by make_dev being called in both bpf_clone()
and bpfopen() in sys/net/bpf.c

Fix: The errors went away when I applied the patch attached below. I
am not sure if this is the correct solution, but it does solve
the problem.

How-To-Repeat: 	
	Compile a kernel under -current with bpf and DEVFS.
	Use any program (such as tcpdump or dhclient) that uses bpf.
Comment 1 Poul-Henning Kamp 2000-09-20 14:10:00 UTC
This fix is not quite correct.

I am working on a better solution to this problem.

Please ignore the message for now, it is harmless.

--
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD coreteam member | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.
Comment 2 Tony Fleisher 2001-05-30 05:16:50 UTC
This PR can be closed.
Comment 3 dd freebsd_committer freebsd_triage 2001-05-30 05:24:03 UTC
State Changed
From-To: open->closed

Problem resolved.