netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipt_ROUTE for kernel 2.6.21.5
@ 2007-07-30 14:42 Ludovic
  2007-07-30 14:45 ` Jan Engelhardt
  0 siblings, 1 reply; 14+ messages in thread
From: Ludovic @ 2007-07-30 14:42 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

Hi guys,

sorry if there is already some patches about this but i've searched
one week how to make the ROUTE target work well.

Here are two patches (one for ipv4 and one for ipv6) which change
ipt_register and ipt_unregister to xt_register and xt_unregister and
which add .family = AF_INET in the xt_target structure declaration.

Best regards.
Ludovic.

[-- Attachment #2: patch_ip6t_ROUTE --]
[-- Type: application/octet-stream, Size: 992 bytes --]

--- linux-2.6.21.5/net/ipv6/netfilter/ip6t_ROUTE.c.orig	2007-07-30 16:13:07.000000000 +0200
+++ linux-2.6.21.5/net/ipv6/netfilter/ip6t_ROUTE.c	2007-07-30 16:14:26.000000000 +0200
@@ -299,8 +299,9 @@ ip6t_route_checkentry(const char *tablen
 }
 
 
-static struct ip6t_target ip6t_route_reg = {
+static struct xt_target ip6t_route_reg = {
 	.name       = "ROUTE",
+	.family	    = AF_INET,
 	.target     = ip6t_route_target,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
 	.targetsize = sizeof(struct ip6t_route_target_info),
@@ -313,7 +314,7 @@ static struct ip6t_target ip6t_route_reg
 static int __init init(void)
 {
 	printk(KERN_DEBUG "registering ipv6 ROUTE target\n");
-	if (ip6t_register_target(&ip6t_route_reg))
+	if (xt_register_target(&ip6t_route_reg))
 		return -EINVAL;
 
 	return 0;
@@ -322,7 +323,7 @@ static int __init init(void)
 
 static void __exit fini(void)
 {
-	ip6t_unregister_target(&ip6t_route_reg);
+	xt_unregister_target(&ip6t_route_reg);
 }
 
 module_init(init);

[-- Attachment #3: patch_ipt_ROUTE --]
[-- Type: application/octet-stream, Size: 1080 bytes --]

--- linux-2.6.21.5/net/ipv4/netfilter/ipt_ROUTE.c.orig	2007-07-30 15:26:16.000000000 +0200
+++ linux-2.6.21.5/net/ipv4/netfilter/ipt_ROUTE.c	2007-07-30 15:50:10.000000000 +0200
@@ -450,8 +450,9 @@ static int ipt_route_checkentry(const ch
 }
 
 
-static struct ipt_target ipt_route_reg = { 
+static struct xt_target ipt_route_reg = { 
 	.name = "ROUTE",
+	.family = AF_INET,
 	.target = ipt_route_target,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
 	.targetsize = sizeof(struct ipt_route_target_info),
@@ -460,6 +461,7 @@ static struct ipt_target ipt_route_reg =
 	.me = THIS_MODULE,
 };
 
+
 static int __init init(void)
 {
 	/* Set up fake conntrack (stolen from raw.patch):
@@ -470,13 +472,13 @@ static int __init init(void)
 	/* Initialize fake conntrack so that NAT will skip it */
 	route_tee_track.status |= IPS_NAT_DONE_MASK;
 
-	return ipt_register_target(&ipt_route_reg);
+	return xt_register_target(&ipt_route_reg);
 }
 
 
 static void __exit fini(void)
 {
-	ipt_unregister_target(&ipt_route_reg);
+	xt_unregister_target(&ipt_route_reg);
 }
 
 module_init(init);

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-08-30 18:21 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30 14:42 [PATCH] ipt_ROUTE for kernel 2.6.21.5 Ludovic
2007-07-30 14:45 ` Jan Engelhardt
2007-07-30 14:47   ` Patrick McHardy
2007-07-30 14:49     ` Jan Engelhardt
2007-07-30 14:50       ` Patrick McHardy
2007-07-30 15:17         ` Krzysztof Oledzki
2007-07-30 15:34           ` Patrick McHardy
2007-07-30 16:39             ` Patrick Schaaf
2007-07-30 19:44               ` Patrick McHardy
2007-08-29 11:23             ` Krzysztof Oledzki
2007-08-29 11:55               ` Jan Engelhardt
2007-08-29 12:12                 ` Krzysztof Oledzki
2007-08-30  6:46                   ` Patrick McHardy
2007-08-30 18:21                     ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).