]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: search first for AF-specific extension
authorArturo Borrero <arturo.borrero.glez@gmail.com>
Thu, 29 Jan 2015 16:44:33 +0000 (17:44 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 30 Jan 2015 18:43:14 +0000 (19:43 +0100)
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 <arturo.borrero.glez@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
libxtables/xtables.c

index 6985a2746c0e58518e8953646a10f200bff26dc5..16e4d9695b313a96c070fa8e59608de236783b77 100644 (file)
@@ -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;