netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [IPROUTE2] IPT action compatibility with iptables 1.4.0
@ 2007-12-24 16:55 jamal
  2007-12-24 17:48 ` Stephen Hemminger
  2007-12-31 19:16 ` Stephen Hemminger
  0 siblings, 2 replies; 5+ messages in thread
From: jamal @ 2007-12-24 16:55 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Denys Fedoryshchenko, netdev, Pablo Neira Ayuso

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


Stephen,

Please apply this patch from Denys Fedoryshchenko to make the ipt action
work with latest iptables.

cheers,
jamal


[-- Attachment #2: ipt-p1 --]
[-- Type: text/plain, Size: 1796 bytes --]

New iptables 1.4.0 has some library names changed from libipt to libxt.
It is prefferable also to open libxt_ first, as newer "style".

Signed-off-by: Denys Fedoryshchenko <nuclearcat@nuclearcat.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>

---
commit fe7b0dd9c19451019494d834c631c045e75e2b05
tree 452a75a6ec17d63832b03972ec9059b5cf9d8cfe
parent 235ac6a41d9d0439cce4eca8acdd31cac28605fc
author Denys Fedoryshchenko <nuclearcat@nuclearcat.com> Mon, 24 Dec 2007 11:51:11 -0500
committer Jamal Hadi Salim <hadi@cyberus.ca> Mon, 24 Dec 2007 11:51:11 -0500

 tc/m_ipt.c |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/tc/m_ipt.c b/tc/m_ipt.c
index acbb8d2..f2a9305 100644
--- a/tc/m_ipt.c
+++ b/tc/m_ipt.c
@@ -69,6 +69,13 @@ register_target(struct iptables_target *me)
 }
 
 void
+xtables_register_target(struct iptables_target *me)
+{
+	me->next = t_list;
+	t_list = me;
+}
+
+void
 exit_tryhelp(int status)
 {
 	fprintf(stderr, "Try `%s -h' or '%s --help' for more information.\n",
@@ -248,11 +255,24 @@ get_target_name(const char *name)
 		}
 	}
 
-	sprintf(path,  "%s/libipt_%s.so",lib_dir, new_name);
+	/* try libxt_xx first */
+	sprintf(path, "%s/libxt_%s.so", lib_dir, new_name);
 	handle = dlopen(path, RTLD_LAZY);
 	if (!handle) {
-		sprintf(path, lib_dir, "/libipt_%s.so", lname);
+		/* try libipt_xx next */
+		sprintf(path, "%s/libipt_%s.so", lib_dir, new_name);
 		handle = dlopen(path, RTLD_LAZY);
+
+		if (!handle) {
+			sprintf(path, "%s/libxt_%s.so", lib_dir , lname);
+			handle = dlopen(path, RTLD_LAZY);
+		}
+
+		if (!handle) {
+			sprintf(path, "%s/libipt_%s.so", lib_dir , lname);
+			handle = dlopen(path, RTLD_LAZY);
+		}
+		/* ok, lets give up .. */
 		if (!handle) {
 			fputs(dlerror(), stderr);
 			printf("\n");

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

* Re: [PATCH] [IPROUTE2] IPT action compatibility with iptables 1.4.0
  2007-12-24 16:55 [PATCH] [IPROUTE2] IPT action compatibility with iptables 1.4.0 jamal
@ 2007-12-24 17:48 ` Stephen Hemminger
  2007-12-24 17:57   ` jamal
  2007-12-31 19:16 ` Stephen Hemminger
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2007-12-24 17:48 UTC (permalink / raw)
  To: hadi; +Cc: Denys Fedoryshchenko, netdev, Pablo Neira Ayuso

On Mon, 24 Dec 2007 11:55:05 -0500
jamal <hadi@cyberus.ca> wrote:

> 
> Stephen,
> 
> Please apply this patch from Denys Fedoryshchenko to make the ipt action
> work with latest iptables.
> 
> cheers,
> jamal
> 

Is this backwards compatible with older kernels?

-- 
Stephen Hemminger <stephen.hemminger@vyatta.com>

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

* Re: [PATCH] [IPROUTE2] IPT action compatibility with iptables 1.4.0
  2007-12-24 17:48 ` Stephen Hemminger
@ 2007-12-24 17:57   ` jamal
  2007-12-25 15:50     ` Denys Fedoryshchenko
  0 siblings, 1 reply; 5+ messages in thread
From: jamal @ 2007-12-24 17:57 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Denys Fedoryshchenko, netdev, Pablo Neira Ayuso

On Mon, 2007-24-12 at 09:48 -0800, Stephen Hemminger wrote:
> On Mon, 24 Dec 2007 11:55:05 -0500

> Is this backwards compatible with older kernels?

Yes. 
Denys change adds forward compat (although iptables in 1.4 is not fully
backward compatible).

cheers,
jamal


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

* Re: [PATCH] [IPROUTE2] IPT action compatibility with iptables 1.4.0
  2007-12-24 17:57   ` jamal
@ 2007-12-25 15:50     ` Denys Fedoryshchenko
  0 siblings, 0 replies; 5+ messages in thread
From: Denys Fedoryshchenko @ 2007-12-25 15:50 UTC (permalink / raw)
  To: hadi, Stephen Hemminger; +Cc: netdev, Pablo Neira Ayuso

I will try to be more careful on patches formatting. I am newbie to this.
And thanks for all responding on christmas :-) Usually all people N/A at this
time.

It seems 2.6.24-rc6 + iptables 1.4.0 + iproute2-git working fine now.



On Mon, 24 Dec 2007 12:57:32 -0500, jamal wrote
> On Mon, 2007-24-12 at 09:48 -0800, Stephen Hemminger wrote:
> > On Mon, 24 Dec 2007 11:55:05 -0500
> 
> > Is this backwards compatible with older kernels?
> 
> Yes. 
> Denys change adds forward compat (although iptables in 1.4 is not fully
> backward compatible).
> 
> cheers,
> jamal
> 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.


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

* Re: [PATCH] [IPROUTE2] IPT action compatibility with iptables 1.4.0
  2007-12-24 16:55 [PATCH] [IPROUTE2] IPT action compatibility with iptables 1.4.0 jamal
  2007-12-24 17:48 ` Stephen Hemminger
@ 2007-12-31 19:16 ` Stephen Hemminger
  1 sibling, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2007-12-31 19:16 UTC (permalink / raw)
  To: hadi; +Cc: Denys Fedoryshchenko, netdev, Pablo Neira Ayuso

On Mon, 24 Dec 2007 11:55:05 -0500
jamal <hadi@cyberus.ca> wrote:

> 
> Stephen,
> 
> Please apply this patch from Denys Fedoryshchenko to make the ipt action
> work with latest iptables.
> 
> cheers,
> jamal
> 

applied and pushed

-- 
Stephen Hemminger <stephen.hemminger@vyatta.com>

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

end of thread, other threads:[~2007-12-31 19:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-24 16:55 [PATCH] [IPROUTE2] IPT action compatibility with iptables 1.4.0 jamal
2007-12-24 17:48 ` Stephen Hemminger
2007-12-24 17:57   ` jamal
2007-12-25 15:50     ` Denys Fedoryshchenko
2007-12-31 19:16 ` Stephen Hemminger

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).