From patchwork Mon Aug 2 07:30:33 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Henriksson X-Patchwork-Id: 60512 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 83A19B6EF1 for ; Mon, 2 Aug 2010 17:48:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235Ab0HBHsO (ORCPT ); Mon, 2 Aug 2010 03:48:14 -0400 Received: from smtprelay-h32.telenor.se ([213.150.131.5]:54902 "EHLO smtprelay-h32.telenor.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751549Ab0HBHsN (ORCPT ); Mon, 2 Aug 2010 03:48:13 -0400 X-Greylist: delayed 1537 seconds by postgrey-1.27 at vger.kernel.org; Mon, 02 Aug 2010 03:48:13 EDT Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-h32.telenor.se (Postfix) with ESMTP id 5F610E8AF1 for ; Mon, 2 Aug 2010 09:22:34 +0200 (CEST) X-SENDER-IP: [85.225.138.33] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmQ4AKsPVkxV4YohPGdsb2JhbACTOIxYDAEBAQE1Lb59hTkEiH8 X-IronPort-AV: E=Sophos;i="4.55,301,1278280800"; d="scan'208";a="113684582" Received: from c-218ae155.447-1-64736c11.cust.bredbandsbolaget.se (HELO amd64.fatal.se) ([85.225.138.33]) by ipb1.telenor.se with ESMTP; 02 Aug 2010 09:22:34 +0200 Received: from gem by amd64.fatal.se with local (Exim 4.72) (envelope-from ) id 1OfpTl-0008LN-3i; Mon, 02 Aug 2010 09:30:33 +0200 Date: Mon, 2 Aug 2010 09:30:33 +0200 From: Andreas Henriksson To: shemminger@vyatta.com Cc: netdev@vger.kernel.org Subject: [PATCH] tc: make symbols loaded from tc action modules global. Message-ID: <20100802073032.GA32046@amd64.fatal.se> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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 --- 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) {