While converting the xt (ipt) tc module to a shared object[1] to get rid
of tc linking directly to xtables I broke the module.

When tc linked directly to xtables, all the symbols where globally
available to all additionally loaded shared objects (libxt_MARK.so).
When loading m_xt.so via dlopen, they aren't because dlopen defaults to
keeping symbols local.

This means that m_xt.so loads libxtables.so symbols, but keeps them
local. When later loading the iptables libxt_MARK.so module, it can't
find the "xt_params" symbol (part of libxtables.so).

The below patch fixes this BUT IS INTENTIONALLY NOT signed off. This
will make all modules symbols global and I've not had time to
investigate what havoc that might wreak (in the future, since right now
m_xt.so is the only tc module available?).

I'll be away for the rest of this week and will hopefully get time next
week to look closer at this. I'd be more then happy if someone else
picked this up while I'm gone. ;P

Regards,
Andreas Henriksson


[1]:
http://git.kernel.org/?p=linux/kernel/git/shemminger/iproute2.git;a=commit;h=ab814d635529787036b3caddb590034a4e6a48e6


diff --git a/tc/m_action.c b/tc/m_action.c
index a198158..6464b2e 100644
--- a/tc/m_action.c
+++ b/tc/m_action.c
@@ -99,7 +99,7 @@ restart_s:
        }
 
        snprintf(buf, sizeof(buf), "%s/m_%s.so", get_tc_lib(), str);
-       dlh = dlopen(buf, RTLD_LAZY);
+       dlh = dlopen(buf, RTLD_LAZY | RTLD_GLOBAL);
        if (dlh == NULL) {
                dlh = aBODY;
                if (dlh == NULL) {





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to