]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxtables: recognize IP6TABLES_LIB_DIR old-style environment variable
authorJan Engelhardt <jengelh@medozas.de>
Tue, 10 Feb 2009 08:54:04 +0000 (09:54 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 10 Feb 2009 09:03:15 +0000 (10:03 +0100)
Commit v1.4.3-rc1-47-g300e290 tried to consolidate the environment
variable presence checking code into xtables.c, but missed
adding IP6TABLES_LIB_DIR to libxtables.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
xtables.c

index 6c954754959603dfe2b3fe4d87b3f6d30db5d344..c8988893f0232b70eaf742a7ac3f56216c2efe5e 100644 (file)
--- a/xtables.c
+++ b/xtables.c
@@ -110,6 +110,19 @@ void xtables_init(void)
                        "use XTABLES_LIBDIR.\n");
                return;
        }
+       /*
+        * Well yes, IP6TABLES_LIB_DIR is of lower priority over
+        * IPTABLES_LIB_DIR since this moved to libxtables; I think that is ok
+        * for these env vars are deprecated anyhow, and in light of the
+        * (shared) libxt_*.so files, makes less sense to have
+        * IPTABLES_LIB_DIR != IP6TABLES_LIB_DIR.
+        */
+       xtables_libdir = getenv("IP6TABLES_LIB_DIR");
+       if (xtables_libdir != NULL) {
+               fprintf(stderr, "IP6TABLES_LIB_DIR is deprecated, "
+                       "use XTABLES_LIBDIR.\n");
+               return;
+       }
        xtables_libdir = XTABLES_LIBDIR;
 }