Subject: kern/6561: ip_fil.h includes opt_* header in user land.
To: None <gnats-bugs@gnats.netbsd.org>
From: Takahiro Kambe <taca@sky.yamashina.kyoto.jp>
List: netbsd-bugs
Date: 12/11/1998 09:21:15
>Number:         6561
>Category:       kern
>Synopsis:       ip_fil.h includes opt_* header in user land.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 10 16:35:01 1998
>Last-Modified:
>Originator:     Takahiro Kambe
>Organization:
>Release:        NetBSD-current 1998/12/10
>Environment:
System: NetBSD land.sky.yamashina.kyoto.jp 1.3I NetBSD 1.3I (LAND) #33: Fri Dec 11 00:55:27 JST 1998 taca@land.sky.yamashina.kyoto.jp:/usr/src/sys/arch/i386/compile/LAND i386


>Description:
	Ip filter's commands can't compile.  This is ip_fil.h includes
	opt_ipfilter_log.h even if _KERNEL dose not defeind.
>How-To-Repeat:
	cd /usr/src/usr.sbin/ipf; make
>Fix:
	Patch is bellow.  We had better check other ip filter's header files.


*** sys/netinet/ip_fil.h.orig	Fri Dec 11 00:19:52 1998
--- sys/netinet/ip_fil.h	Fri Dec 11 09:12:03 1998
***************
*** 14,26 ****
  #ifndef _NETINET_IP_FIL_H_
  #define _NETINET_IP_FIL_H_
  
- #if defined(__NetBSD__)
- # if defined(PFIL_HOOKS)
- #  include "opt_pfil_hooks.h"
- # endif
- # include "opt_ipfilter_log.h"
- #endif
- 
  /*
   * Pathnames for various IP Filter control devices.  Used by LKM
   * and userland, so defined here.
--- 14,19 ----
***************
*** 35,40 ****
--- 28,40 ----
  
  #if defined(KERNEL) && !defined(_KERNEL)
  #define	_KERNEL
+ #endif
+ 
+ #if defined _KERNEL && defined(__NetBSD__)
+ # if defined(PFIL_HOOKS)
+ #  include "opt_pfil_hooks.h"
+ # endif
+ # include "opt_ipfilter_log.h"
  #endif
  
  #ifndef	__P

>Audit-Trail:
>Unformatted: