NetBSD Problem Report #679

From gnats  Mon Jan  2 13:03:50 1995
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id NAA01786 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Mon, 2 Jan 1995 13:03:50 -0800
Message-Id: <199501022106.QAA09958@lola-granola.MIT.EDU>
Date: Mon, 2 Jan 1995 16:06:10 -0500
From: jhawk@MIT.EDU
Reply-To: jhawk@MIT.EDU
To: gnats-bugs@NetBSD.ORG
Subject: /usr/include/net/bpf.h doesn't protect itself
X-Send-Pr-Version: 3.2

>Number:         679
>Category:       kern
>Synopsis:       /usr/include/net/bpf.h doesn't protect itself
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 02 13:05:05 +0000 1995
>Closed-Date:    Thu Jan 12 16:34:24 +0000 1995
>Last-Modified:  
>Originator:     John Hawkinson
>Release:        1.0
>Organization:
MIT
>Environment:
System: NetBSD lola-granola 1.0 NetBSD 1.0 (LOLA-DDB) #56: Sat Dec 17 13:51:12 EST 1994 fsf@lola-granola:/u1/usr/src/sys/arch/i386/compile/LOLA-DDB i386
This bug is present in today's -current.

>Description:

	<net/bpf.h> causes problems when it is included multiple times.
	libpcap (for tcpdump 3.0) does this.

>How-To-Repeat:

	#include <net/bpf.h>
	#include <net/bpf.h>   /* ;-) */

>Fix:

*** 1.1	1995/01/02 20:47:47
--- bpf.h	1995/01/02 21:04:32
***************
*** 1,4 ****
! /*	$NetBSD: bpf.h,v 1.6 1994/06/29 06:35:54 cgd Exp $	*/

  /*
   * Copyright (c) 1990, 1991, 1993
--- 1,4 ----
! /*	$Id: bpf.h,v 1.3 1995/01/02 21:04:32 jhawk Exp $	*/

  /*
   * Copyright (c) 1990, 1991, 1993
***************
*** 40,45 ****
--- 40,48 ----
   *	@(#)bpf.h	8.1 (Berkeley) 6/10/93
   */

+ #ifndef _BPF_H_
+ #define _BPF_H_
+ 
  /*
   * Alignment macros.  BPF_WORDALIGN rounds up to the next 
   * even multiple of BPF_ALIGNMENT. 
***************
*** 250,252 ****
--- 253,256 ----
   */
  #define BPF_MEMWORDS 16

+ #endif /* _BPF_H_ */

>Release-Note:
>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: jtc
State-Changed-When: Thu Jan 12 16:34:24 1995
State-Changed-Why:
Patch applied, but used _NET_BPF_H_ instead of _BPF_H_.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

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