diff options
Diffstat (limited to 'iptables-save.c')
-rw-r--r-- | iptables-save.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/iptables-save.c b/iptables-save.c index c0c37eda..1ce20901 100644 --- a/iptables-save.c +++ b/iptables-save.c @@ -357,9 +357,14 @@ main(int argc, char *argv[]) program_name = "iptables-save"; program_version = IPTABLES_VERSION; - lib_dir = getenv("IPTABLES_LIB_DIR"); - if (!lib_dir) - lib_dir = IPT_LIB_DIR; + lib_dir = getenv("XTABLES_LIBDIR"); + if (lib_dir == NULL) { + lib_dir = getenv("IPTABLES_LIB_DIR"); + if (lib_dir != NULL) + fprintf(stderr, "IPTABLES_LIB_DIR is deprecated\n"); + } + if (lib_dir == NULL) + lib_dir = XTABLES_LIBDIR; #ifdef NO_SHARED_LIBS init_extensions(); |