netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Denys Fedoryshchenko" <denys@visp.net.lb>
To: netdev@vger.kernel.org
Subject: iproute2 action ipt + iptables 1.4.0
Date: Mon, 24 Dec 2007 17:11:47 +0200	[thread overview]
Message-ID: <20071224151147.M93927@visp.net.lb> (raw)

Hi again :-)

Happy holidays :-)

It seems there is serious break in compatibility, but can be fixed by ugly
way. Maybe just to add patch below, and to search libipt AND libxt (for my
case i just edit and change libipt to libxt, but it can be handled in more
smart way.
After i apply all this - it seems working fine.

iff -Naur iproute2-git/tc/m_ipt.c iproute2-new/tc/m_ipt.c
--- iproute2-git/tc/m_ipt.c     2007-12-24 16:59:19.000000000 +0200
+++ iproute2-new/tc/m_ipt.c     2007-12-24 17:07:11.000000000 +0200
@@ -69,6 +69,27 @@
 }

 void
+xtables_register_target(struct iptables_target *me)
+{
+/*      fprintf(stderr, "\nDummy register_target %s \n", me->name);
+*/
+       me->next = t_list;
+       t_list = me;
+
+}
+
+
+void
+xtables_register_match(struct iptables_target *me)
+{
+/*      fprintf(stderr, "\nDummy register_target %s \n", me->name);
+*/
+       me->next = t_list;
+       t_list = me;
+
+}
+
+void
 exit_tryhelp(int status)
 {
        fprintf(stderr, "Try `%s -h' or '%s --help' for more information.\n",

There is trivial patch also, for bug (IMHO bug) in searching lowercased
library. If patch not applied - second time it will try to open lib_dir by
dlopen:-)

--- iproute2-git/tc/m_ipt.c     2007-12-24 16:59:19.000000000 +0200
+++ iproute2/tc/m_ipt.c 2007-12-24 17:00:41.000000000 +0200
@@ -251,7 +251,7 @@
        sprintf(path,  "%s/libipt_%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 , lname);
                handle = dlopen(path, RTLD_LAZY);
                if (!handle) {
                        fputs(dlerror(), stderr);

Sorry for probably bad style/code, i am not programmer at all.


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


             reply	other threads:[~2007-12-24 15:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-24 15:11 Denys Fedoryshchenko [this message]
2007-12-24 15:25 ` iproute2 action ipt + iptables 1.4.0 jamal
  -- strict thread matches above, loose matches on Subject: below --
2007-12-24  9:31 Denys Fedoryshchenko
2007-12-24 13:50 ` jamal

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=20071224151147.M93927@visp.net.lb \
    --to=denys@visp.net.lb \
    --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 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).