From patchwork Thu Jan 29 16:44:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arturo Borrero X-Patchwork-Id: 434600 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id D01891402CC for ; Fri, 30 Jan 2015 03:44:46 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755886AbbA2Qop (ORCPT ); Thu, 29 Jan 2015 11:44:45 -0500 Received: from smtp3.cica.es ([150.214.5.190]:42698 "EHLO smtp.cica.es" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754248AbbA2Qoo (ORCPT ); Thu, 29 Jan 2015 11:44:44 -0500 Received: from localhost (unknown [127.0.0.1]) by smtp.cica.es (Postfix) with ESMTP id C2E0051F074; Thu, 29 Jan 2015 16:44:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at cica.es Received: from smtp.cica.es ([127.0.0.1]) by localhost (mail.cica.es [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mzoShL+HwUt3; Thu, 29 Jan 2015 17:44:36 +0100 (CET) Received: from nfdev.cica.es (nfdev.cica.es [150.214.8.220]) by smtp.cica.es (Postfix) with ESMTP id 5005251F144; Thu, 29 Jan 2015 17:44:36 +0100 (CET) Subject: [ebtables-compat PATCH 1/2] libxtables: search first for AF-specific extension From: Arturo Borrero Gonzalez To: netfilter-devel@vger.kernel.org Cc: pablo@netfilter.org Date: Thu, 29 Jan 2015 17:44:33 +0100 Message-ID: <20150129164433.21224.14657.stgit@nfdev.cica.es> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org There are some extension which may name-clash, for example: * libxt_mark.so * liebt_mark.so Let's search first for AF-specific extension and then for the generic libxt_**. Signed-off-by: Arturo Borrero Gonzalez --- libxtables/xtables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/libxtables/xtables.c b/libxtables/xtables.c index 6985a27..16e4d96 100644 --- a/libxtables/xtables.c +++ b/libxtables/xtables.c @@ -549,7 +549,7 @@ void xtables_parse_interface(const char *arg, char *vianame, static void *load_extension(const char *search_path, const char *af_prefix, const char *name, bool is_target) { - const char *all_prefixes[] = {"libxt_", af_prefix, NULL}; + const char *all_prefixes[] = {af_prefix, "libxt_", NULL}; const char **prefix; const char *dir = search_path, *next; void *ptr = NULL;