netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tc: make symbols loaded from tc action modules global.
@ 2010-08-02  7:30 Andreas Henriksson
  2010-08-02 16:55 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Henriksson @ 2010-08-02  7:30 UTC (permalink / raw)
  To: shemminger; +Cc: netdev

Fixes problems with xtables based MARK target ("ipt" module).
When tc loads the "ipt" (xt) module it kept the symbols local,
this made loading of libxtables not find the required struct.

currently ipt/xt is the only tc action module.
iproute2 never seem to do dlclose.
hopefully the modules doesn't export more symbols then needed.

In this situation hopefully the RTLD_GLOBAL flag won't hurt us.

I've been using this patch in the Debian package of iproute for
the last 3 weeks and noone has complained.
( This fixes http://bugs.debian.org/584898 )

Signed-off-by: Andreas Henriksson <andreas@fatal.se>
---
 tc/m_action.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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) {
-- 
1.7.1


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

end of thread, other threads:[~2010-08-02 16:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-02  7:30 [PATCH] tc: make symbols loaded from tc action modules global Andreas Henriksson
2010-08-02 16:55 ` 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).