Skip to contentSkip to conversation

New target 'ROUTE' - cvs patch

PATCH Cédric de Launois 2 participants 2 messages Jun 11, 2002 – Jun 13, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

Here is the patch against the current CVS tree to include the new target 'ROUTE'. The patches have been tested, they work fine for me. Doing
patch -p0 < ROUTE.cvs.patch
in the same directory as netfilter/ should apply the patch correctly.

The new rsip table is not included in this patch, but the target ROUTE can be used in any tables, on PREROUTING hooks.

I put the ROUTE patches in the patch-o-matic/pending directory -- is it the right place ? --

Cédric de Launois

userspace/extensions/.ROUTE-test +2 -0
diff -Nru netfilter.orig/userspace/extensions/.ROUTE-test netfilter/userspace/extensions/.ROUTE-test
@@ -0,0 +1,2 @@
+#! /bin/sh
+[ -f $KERNEL_DIR/net/ipv4/netfilter/ipt_ROUTE.c ] && echo ROUTE
userspace/extensions/Makefile +1 -1
diff -Nru netfilter.orig/userspace/extensions/Makefile netfilter/userspace/extensions/Makefile
@@ -1,6 +1,6 @@
 #! /usr/bin/make
 
-PF_EXT_SLIB:=ah conntrack dscp ecn esp icmp length limit mac mark multiport owner pkttype standard state tcp tcpmss tos ttl udp unclean DNAT DSCP ECN LOG MARK MASQUERADE MIRROR REDIRECT REJECT SAME SNAT TCPMSS TOS ULOG
+PF_EXT_SLIB:=ah conntrack dscp ecn esp icmp length limit mac mark multiport owner pkttype standard state tcp tcpmss tos ttl udp unclean DNAT DSCP ECN LOG MARK MASQUERADE MIRROR REDIRECT REJECT SAME SNAT TCPMSS TOS ULOG ROUTE
 PF6_EXT_SLIB:=eui64 icmpv6 length limit mac mark multiport owner standard tcp udp LOG MARK
 
 # The following may not be present, but compile them anyway.
userspace/extensions/libipt_ROUTE.c +142 -0

142 lines not on this page · raw message

userspace/include/linux/netfilter_ipv4/ipt_ROUTE.h +8 -0
diff -Nru netfilter.orig/userspace/include/linux/netfilter_ipv4/ipt_ROUTE.h netfilter/userspace/include/linux/netfilter_ipv4/ipt_ROUTE.h
@@ -0,0 +1,8 @@
+#ifndef _IPT_ROUTE_H_target
+#define _IPT_ROUTE_H_target
+
+struct ipt_route_target_info {
+	unsigned int if_index;
+};
+
+#endif /*_IPT_ROUTE_H_target*/
userspace/patch-o-matic/pending/ROUTE.patch +263 -0

263 lines not on this page · raw message

userspace/patch-o-matic/pending/ROUTE.patch.config.in +2 -0
diff -Nru netfilter.orig/userspace/patch-o-matic/pending/ROUTE.patch.config.in netfilter/userspace/patch-o-matic/pending/ROUTE.patch.config.in
@@ -0,0 +1,2 @@
+  dep_tristate '  LOG target support' CONFIG_IP_NF_TARGET_LOG $CONFIG_IP_NF_IPTABLES
+  dep_tristate '  ROUTE target support' CONFIG_IP_NF_TARGET_ROUTE $CONFIG_IP_NF_IPTABLES
userspace/patch-o-matic/pending/ROUTE.patch.configure.help +16 -0
diff -Nru netfilter.orig/userspace/patch-o-matic/pending/ROUTE.patch.configure.help netfilter/userspace/patch-o-matic/pending/ROUTE.patch.configure.help
@@ -0,0 +1,16 @@
+CONFIG_IP_NF_TARGET_LOG
+ROUTE target support
+CONFIG_IP_NF_TARGET_ROUTE
+  This option adds a `ROUTE' target, which allows you to directly route
+  a received packet through a specified interface, even and especially
+  if the packet IP address is one of the router itself. Those packets 
+  are locally delivered and cannot be forwarded to another computer 
+  using the standard routing mechanisms.
+
+  This target is particularly useful if you intend to use RSIP protocol
+  (RFC3102, RFC3103).
+
+  If you want to compile it as a module, say M here and read
+  Documentation/modules.txt.  If unsure, say `N'.
+
+ 
userspace/patch-o-matic/pending/ROUTE.patch.help +13 -0
diff -Nru netfilter.orig/userspace/patch-o-matic/pending/ROUTE.patch.help netfilter/userspace/patch-o-matic/pending/ROUTE.patch.help
@@ -0,0 +1,13 @@
+Author: Cédric de Launois <[email protected]>
+Status: In Development/Works for me
+  
+  This option adds a `ROUTE' target, which allows you to directly route
+  a received packet through a specified interface, even and especially
+  if the packet IP address is one of the router itself. Those packets 
+  are locally delivered and cannot be forwarded to another computer 
+  using the standard routing mechanisms.
+
+  This target is particularly useful if you intend to use RSIP protocol
+  (RFC3102, RFC3103).
+
+ 
userspace/patch-o-matic/pending/ROUTE.patch.makefile +2 -0
diff -Nru netfilter.orig/userspace/patch-o-matic/pending/ROUTE.patch.makefile netfilter/userspace/patch-o-matic/pending/ROUTE.patch.makefile
@@ -0,0 +1,2 @@
+obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
+obj-$(CONFIG_IP_NF_TARGET_ROUTE) += ipt_ROUTE.o
#1 lore raw
Quoted 7 lines · Cédric de Launois

Hi,

Here is the patch against the current CVS tree to include the new target 'ROUTE'. The patches have been tested, they work fine for me. Doing
patch -p0 < ROUTE.cvs.patch
in the same directory as netfilter/ should apply the patch correctly.

great. applied.

two minor modifications:

1) move it to 'extra', since we consider it as experimental at the moment.
2) remove your change to extensions/Makefile. Only targets in the kernel (or to be submitted to the kernel soon) are in extensions/Makefile.

Quoted 1 line

Cédric de Launois

Signature · 5 lines
Live long and prosper
- Harald Welte / [email protected]               http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M+ 
V-- PS++ PE-- Y++ PGP++ t+ 5-- !X !R tv-- b+++ !DI !D G+ e* h--- r++ y+(*)