summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/ip6tables.h2
-rw-r--r--include/iptables.h2
-rw-r--r--ip6tables-restore.c1
-rw-r--r--ip6tables-save.c1
-rw-r--r--ip6tables-standalone.c1
-rw-r--r--ip6tables.c1
-rw-r--r--iptables-restore.c1
-rw-r--r--iptables-save.c1
-rw-r--r--iptables-standalone.c1
-rw-r--r--iptables.c1
10 files changed, 10 insertions, 2 deletions
diff --git a/include/ip6tables.h b/include/ip6tables.h
index 86587e6f..ca0f9a05 100644
--- a/include/ip6tables.h
+++ b/include/ip6tables.h
@@ -15,4 +15,6 @@ extern int flush_entries(const ip6t_chainlabel chain, int verbose, struct ip6tc_
extern int delete_chain(const ip6t_chainlabel chain, int verbose, struct ip6tc_handle *handle);
void print_rule(const struct ip6t_entry *e, struct ip6tc_handle *h, const char *chain, int counters);
+extern struct xtables_globals ip6tables_globals;
+
#endif /*_IP6TABLES_USER_H*/
diff --git a/include/iptables.h b/include/iptables.h
index f0aa3455..84211c32 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -26,4 +26,6 @@ extern void get_kernel_version(void);
#define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF)
#define LINUX_VERSION_PATCH(x) ( (x) & 0xFF)
+extern struct xtables_globals iptables_globals;
+
#endif /*_IPTABLES_USER_H*/
diff --git a/ip6tables-restore.c b/ip6tables-restore.c
index acaf97b4..3d535def 100644
--- a/ip6tables-restore.c
+++ b/ip6tables-restore.c
@@ -133,6 +133,7 @@ int main(int argc, char *argv[])
xtables_program_name = program_name;
xtables_init();
xtables_set_nfproto(NFPROTO_IPV6);
+ ip6tables_globals.program_name = "ip6tables-restore";
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
diff --git a/ip6tables-save.c b/ip6tables-save.c
index 32b59926..3af81abd 100644
--- a/ip6tables-save.c
+++ b/ip6tables-save.c
@@ -142,6 +142,7 @@ int main(int argc, char *argv[])
xtables_program_name = program_name;
xtables_init();
xtables_set_nfproto(NFPROTO_IPV6);
+ ip6tables_globals.program_name = "ip6tables-save";
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
diff --git a/ip6tables-standalone.c b/ip6tables-standalone.c
index cea48186..ab770655 100644
--- a/ip6tables-standalone.c
+++ b/ip6tables-standalone.c
@@ -55,6 +55,7 @@ main(int argc, char *argv[])
xtables_program_name = program_name;
xtables_init();
xtables_set_nfproto(NFPROTO_IPV6);
+ ip6tables_globals.program_name = "ip6tables";
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
diff --git a/ip6tables.c b/ip6tables.c
index a73ea9ae..fad7ef2d 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -149,7 +149,6 @@ void ip6tables_exit_error(enum xtables_exittype status, const char *msg, ...) __
struct xtables_globals ip6tables_globals = {
.option_offset = 0,
.program_version = IPTABLES_VERSION,
- .program_name = "ip6tables",
.opts = original_opts,
.exit_err = ip6tables_exit_error,
};
diff --git a/iptables-restore.c b/iptables-restore.c
index 810806f0..01030166 100644
--- a/iptables-restore.c
+++ b/iptables-restore.c
@@ -135,6 +135,7 @@ main(int argc, char *argv[])
xtables_program_name = program_name;
xtables_init();
xtables_set_nfproto(NFPROTO_IPV4);
+ iptables_globals.program_name = "iptables-restore";
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
diff --git a/iptables-save.c b/iptables-save.c
index c4306fd1..396406fe 100644
--- a/iptables-save.c
+++ b/iptables-save.c
@@ -142,6 +142,7 @@ main(int argc, char *argv[])
xtables_program_name = program_name;
xtables_init();
xtables_set_nfproto(NFPROTO_IPV4);
+ iptables_globals.program_name = "iptables-save";
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
diff --git a/iptables-standalone.c b/iptables-standalone.c
index ece7cf42..007f2c2d 100644
--- a/iptables-standalone.c
+++ b/iptables-standalone.c
@@ -56,6 +56,7 @@ main(int argc, char *argv[])
xtables_program_name = program_name;
xtables_init();
xtables_set_nfproto(NFPROTO_IPV4);
+ iptables_globals.program_name = "iptables";
#ifdef NO_SHARED_LIBS
init_extensions();
#endif
diff --git a/iptables.c b/iptables.c
index b90952dc..670d8aa7 100644
--- a/iptables.c
+++ b/iptables.c
@@ -150,7 +150,6 @@ void iptables_exit_error(enum xtables_exittype status, const char *msg, ...) __a
struct xtables_globals iptables_globals = {
.option_offset = 0,
.program_version = IPTABLES_VERSION,
- .program_name = "iptables",
.opts = original_opts,
.exit_err = iptables_exit_error,
};