summaryrefslogtreecommitdiffstats
path: root/iptables-save.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2009-02-09 18:58:45 +0100
committerPatrick McHardy <kaber@trash.net>2009-02-09 18:58:45 +0100
commit300e2909ba4714abc6093cba0ed860708282bd3e (patch)
tree545c79c9fcbe036db503e50a3643acb3d5ff088d /iptables-save.c
parent9cfc59f71f83ee97c4513fd340acf1e45073562b (diff)
parent1eb619f3a0508d62847c311e69a09f4a8534c4df (diff)
Merge branch 'master' of git://dev.medozas.de/iptables
Diffstat (limited to 'iptables-save.c')
-rw-r--r--iptables-save.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/iptables-save.c b/iptables-save.c
index 7118d1f2..c4306fd1 100644
--- a/iptables-save.c
+++ b/iptables-save.c
@@ -74,7 +74,7 @@ static int do_output(const char *tablename)
time_t now = time(NULL);
printf("# Generated by iptables-save v%s on %s",
- XTABLES_VERSION, ctime(&now));
+ IPTABLES_VERSION, ctime(&now));
printf("*%s\n", tablename);
/* Dump out chain names first,
@@ -137,18 +137,11 @@ main(int argc, char *argv[])
int c;
program_name = "iptables-save";
- program_version = XTABLES_VERSION;
-
- 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, "
- "use XTABLES_LIBDIR.\n");
- }
- if (lib_dir == NULL)
- lib_dir = XTABLES_LIBDIR;
+ program_version = IPTABLES_VERSION;
+ xtables_program_name = program_name;
+ xtables_init();
+ xtables_set_nfproto(NFPROTO_IPV4);
#ifdef NO_SHARED_LIBS
init_extensions();
#endif