tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

defflag'ing ipfilter options



I've been annoyed for a while that most of the ipfilter options aren't
defflag'ed into opt_ipfilter.h and one has to rm(1) Just The Right(tm)
.o files before recompiling the kernel.  Especially to get IPFILTER_LOOKUP
support for ippool(8).

Does anyone object to a change along the following lines?  

While there I made the inclusion of opt_ipfilter_log.h vs. opt_ipfilter.h
depending on the same condition in all the files.

Index: netinet/files.ipfilter
===================================================================
RCS file: /cvsroot/src/sys/netinet/files.ipfilter,v
retrieving revision 1.8
diff -u -r1.8 files.ipfilter
--- netinet/files.ipfilter      17 Sep 2006 13:43:15 -0000      1.8
+++ netinet/files.ipfilter      14 Dec 2009 22:36:09 -0000
@@ -1,8 +1,14 @@
 #      $NetBSD: files.ipfilter,v 1.8 2006/09/17 13:43:15 yamt Exp $
 
 defflag        opt_ipfilter.h  IPFILTER_LOG            # logging of ip packets
+defparam       opt_ipfilter.h  IPFILTER_LOGSIZE
 defflag        opt_ipfilter.h  IPFILTER_DEFAULT_BLOCK
+defflag        opt_ipfilter.h  IPFILTER_CKSUM
 defflag        opt_ipfilter.h  IPFILTER_LOOKUP
+defflag        opt_ipfilter.h  IPFILTER_SCAN
+defflag        opt_ipfilter.h  IPFILTER_SYNC
+defflag        opt_ipfilter.h  IPFILTER_COMPILED
+defflag        opt_ipfilter.h  IPFILTER_BPF
 
 defpseudo ipfilter: ifnet              # XXX not really an ifnet
 
Index: dist/ipf/netinet/fil.c
===================================================================
RCS file: /cvsroot/src/sys/dist/ipf/netinet/fil.c,v
retrieving revision 1.45
diff -u -r1.45 fil.c
--- dist/ipf/netinet/fil.c      19 Aug 2009 08:36:10 -0000      1.45
+++ dist/ipf/netinet/fil.c      14 Dec 2009 22:36:15 -0000
@@ -19,7 +19,7 @@
 #include <sys/time.h>
 #if defined(__NetBSD__)
 # if (NetBSD >= 199905) && !defined(IPFILTER_LKM) && defined(_KERNEL)
-#  if (__NetBSD_Version__ < 301000000)
+#  if (__NetBSD_Version__ < 399001400)
 #   include "opt_ipfilter_log.h"
 #  else
 #   include <sys/cdefs.h>
Index: dist/ipf/netinet/ip_proxy.c
===================================================================
RCS file: /cvsroot/src/sys/dist/ipf/netinet/ip_proxy.c,v
retrieving revision 1.19
diff -u -r1.19 ip_proxy.c
--- dist/ipf/netinet/ip_proxy.c 19 Aug 2009 08:36:11 -0000      1.19
+++ dist/ipf/netinet/ip_proxy.c 14 Dec 2009 22:36:15 -0000
@@ -46,6 +46,15 @@
 #  include <sys/mbuf.h>
 # endif
 #endif
+#if defined(__NetBSD__)
+# if (NetBSD >= 199905) && !defined(IPFILTER_LKM) && defined(_KERNEL)
+#  if (__NetBSD_Version__ < 399001400)
+#   include "opt_ipfilter_log.h"
+#  else
+#   include "opt_ipfilter.h"
+#  endif
+# endif
+#endif
 #if defined(_KERNEL) && (__FreeBSD_version >= 220000)
 # include <sys/filio.h>
 # include <sys/fcntl.h>
Index: dist/ipf/netinet/ip_sync.c
===================================================================
RCS file: /cvsroot/src/sys/dist/ipf/netinet/ip_sync.c,v
retrieving revision 1.12
diff -u -r1.12 ip_sync.c
--- dist/ipf/netinet/ip_sync.c  19 Aug 2009 08:36:13 -0000      1.12
+++ dist/ipf/netinet/ip_sync.c  14 Dec 2009 22:36:15 -0000
@@ -39,6 +39,13 @@
 #endif
 #if defined(__NetBSD__) && (__NetBSD_Version__ >= 104000000)
 # include <sys/proc.h>
+# if (NetBSD >= 199905) && !defined(IPFILTER_LKM) && defined(_KERNEL)
+#  if (__NetBSD_Version__ < 399001400)
+#   include "opt_ipfilter_log.h"
+#  else
+#   include "opt_ipfilter.h"
+#  endif
+# endif
 #endif
 #if defined(_KERNEL) && (__FreeBSD_version >= 220000)
 # include <sys/filio.h>


Home | Main Index | Thread Index | Old Index