From: "Denys Fedoryshchenko" <denys@visp.net.lb>
To: hadi@cyberus.ca
Cc: netdev@vger.kernel.org
Subject: [PATCH] [IPROUTE2] Compatibility with iptables 1.4.0
Date: Mon, 24 Dec 2007 18:07:38 +0200 [thread overview]
Message-ID: <20071224160739.M84357@visp.net.lb> (raw)
Hi, probably like this will be better?
Previous patch was not backward compatible.
Btw i checked twice, name is changed from libipt_MARK to libxt_MARK. So
probably when you have tested this, your iproute2 was looking to old
libipt_MARK (iptables is not deleting old libraries on make install).
-------------------------
New iptables 1.4.0 need additional dummy functions, and some library names is
changed from libipt to libxt.
It is prefferable also to open libxt_ first, as newer "style".
Signed-off-by: Denys Fedoryshchenko <nuclearcat@nuclearcat.com>
---
drivers/watchdog/w83697hf_wdt.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff -Naur iproute2/tc/m_ipt.c iproute2-new/tc/m_ipt.c
--- iproute2/tc/m_ipt.c 2007-12-24 16:59:19.000000000 +0200
+++ iproute2-new/tc/m_ipt.c 2007-12-24 17:46:14.000000000 +0200
@@ -69,6 +69,27 @@
}
void
+xtables_register_target(struct iptables_target *me)
+{
+ me->next = t_list;
+ t_list = me;
+}
+
+
+void
+xtables_register_match(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,16 +269,25 @@
}
}
- sprintf(path, "%s/libipt_%s.so",lib_dir, new_name);
+ 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);
+ sprintf(path, "%s/libipt_%s.so", lib_dir , new_name);
handle = dlopen(path, RTLD_LAZY);
- if (!handle) {
- fputs(dlerror(), stderr);
- printf("\n");
- return NULL;
- }
+ }
+ 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);
+ }
+ if (!handle) {
+ sprintf(path, "%s/libipt_%s.so", lib_dir , lname);
+ fputs(dlerror(), stderr);
+ printf("\n");
+ return NULL;
}
m = dlsym(handle, new_name);
--
Denys Fedoryshchenko
Technical Manager
Virtual ISP S.A.L.
next reply other threads:[~2007-12-24 16:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-24 16:07 Denys Fedoryshchenko [this message]
2007-12-24 16:30 ` [PATCH] [IPROUTE2] Compatibility with iptables 1.4.0 jamal
2007-12-24 16:57 ` jamal
2007-12-26 10:59 ` Pablo Neira Ayuso
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=20071224160739.M84357@visp.net.lb \
--to=denys@visp.net.lb \
--cc=hadi@cyberus.ca \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.