summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2004-10-25 20:02:34 +0000
committerandre <andre@FreeBSD.org>2004-10-25 20:02:34 +0000
commit4bbe5a2c0fe11eb31a56ddc303c089ff278b36b6 (patch)
tree4915e23206d1ccfe368221a6bbdac151547aaff4 /sys
parent50d63268a9d477e7c04c618790bb07acc44dc916 (diff)
downloadFreeBSD-src-4bbe5a2c0fe11eb31a56ddc303c089ff278b36b6.zip
FreeBSD-src-4bbe5a2c0fe11eb31a56ddc303c089ff278b36b6.tar.gz
IPDIVERT is a module now and tell the other parts of the kernel about it.
IPDIVERT depends on IPFIREWALL being loaded or compiled into the kernel.
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/NOTES3
-rw-r--r--sys/modules/Makefile1
-rw-r--r--sys/modules/ipfw/Makefile4
-rw-r--r--sys/netinet/ip_divert.c4
4 files changed, 7 insertions, 5 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES
index cd55ed0..2f28b32 100644
--- a/sys/conf/NOTES
+++ b/sys/conf/NOTES
@@ -622,7 +622,8 @@ device stf #6to4 IPv6 over IPv4 encapsulation
# means that you won't get stuck if the kernel and /sbin/ipfw binary get
# out of sync.
#
-# IPDIVERT enables the divert IP sockets, used by ``ipfw divert''
+# IPDIVERT enables the divert IP sockets, used by ``ipfw divert''. It
+# depends on IPFIREWALL if compiled into the kernel.
#
# IPFIREWALL_FORWARD enables changing of the packet destination either
# to do some sort of policy routing or transparent proxying. Used by
diff --git a/sys/modules/Makefile b/sys/modules/Makefile
index b9c23bb..816508a 100644
--- a/sys/modules/Makefile
+++ b/sys/modules/Makefile
@@ -106,6 +106,7 @@ SUBDIR= ${_3dfx} \
${_iir} \
${_io} \
ip6fw \
+ ipdivert \
${_ipfilter} \
ipfw \
ip_mroute_mod \
diff --git a/sys/modules/ipfw/Makefile b/sys/modules/ipfw/Makefile
index c6b7014..cd5a6f7 100644
--- a/sys/modules/ipfw/Makefile
+++ b/sys/modules/ipfw/Makefile
@@ -14,9 +14,5 @@ CFLAGS+= -DIPFIREWALL
#If you want it to pass all packets by default
#CFLAGS+= -DIPFIREWALL_DEFAULT_TO_ACCEPT
#
-#If you want it with divert(4) support (kernel must be compiled
-#with "options IPDIVERT" for this to work)
-#CFLAGS+= -DIPDIVERT
-#
.include <bsd.kmod.mk>
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 7be0e35..ed21cc3 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -31,10 +31,14 @@
#if !defined(KLD_MODULE)
#include "opt_inet.h"
+#include "opt_ipfw.h"
#include "opt_mac.h"
#ifndef INET
#error "IPDIVERT requires INET."
#endif
+#ifndef IPFIREWALL
+#error "IPDIVERT requires IPFIREWALL"
+#endif
#endif
#include <sys/param.h>
OpenPOWER on IntegriCloud