netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ludovic <ludovic.mailinglist@gmail.com>
To: netfilter-devel@lists.netfilter.org
Subject: [PATCH] ipt_ROUTE for kernel 2.6.21.5
Date: Mon, 30 Jul 2007 16:42:15 +0200	[thread overview]
Message-ID: <2cb453e80707300742i66b81b95pde18e37a6db046d5@mail.gmail.com> (raw)

[-- 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);

             reply	other threads:[~2007-07-30 14:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-30 14:42 Ludovic [this message]
2007-07-30 14:45 ` [PATCH] ipt_ROUTE for kernel 2.6.21.5 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2cb453e80707300742i66b81b95pde18e37a6db046d5@mail.gmail.com \
    --to=ludovic.mailinglist@gmail.com \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).