From 39bf9c8214d3073a496a8a1eff91046a8d6fbbdf Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 27 Jan 2009 15:59:06 +0100 Subject: libxtables: prefix/order - libdir Consolidate the libdir variable initialization code into xtables.c. Signed-off-by: Jan Engelhardt --- ip6tables-standalone.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'ip6tables-standalone.c') diff --git a/ip6tables-standalone.c b/ip6tables-standalone.c index f4b1f18f..95435576 100644 --- a/ip6tables-standalone.c +++ b/ip6tables-standalone.c @@ -52,16 +52,7 @@ main(int argc, char *argv[]) program_name = "ip6tables"; program_version = XTABLES_VERSION; - lib_dir = getenv("XTABLES_LIBDIR"); - if (lib_dir == NULL) { - lib_dir = getenv("IP6TABLES_LIB_DIR"); - if (lib_dir != NULL) - fprintf(stderr, "IP6TABLES_LIB_DIR is deprecated, " - "use XTABLES_LIBDIR.\n"); - } - if (lib_dir == NULL) - lib_dir = XTABLES_LIBDIR; - + xtables_init(); #ifdef NO_SHARED_LIBS init_extensions(); #endif -- cgit v1.2.3 From dacafa55379fd98212031d8c559096c91d7ce93b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 27 Jan 2009 20:56:23 +0100 Subject: libxtables: prefix/order - program_name Split XTABLES_VERSION into xtables and iptables, and encode the xtables soversion into the extensions instead. This makes it possible to upgrade iptables without having to recompile 3rd-party extensions (if the libxtables version matches, of course). Signed-off-by: Jan Engelhardt --- ip6tables-standalone.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ip6tables-standalone.c') diff --git a/ip6tables-standalone.c b/ip6tables-standalone.c index 95435576..3ab114ea 100644 --- a/ip6tables-standalone.c +++ b/ip6tables-standalone.c @@ -50,8 +50,9 @@ main(int argc, char *argv[]) struct ip6tc_handle *handle = NULL; program_name = "ip6tables"; - program_version = XTABLES_VERSION; + program_version = IPTABLES_VERSION; + xtables_program_name = program_name; xtables_init(); #ifdef NO_SHARED_LIBS init_extensions(); -- cgit v1.2.3 From 77f48c2f1ef21fa43aa68c25a1457db319ca2526 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 7 Feb 2009 19:59:53 +0100 Subject: libxtables: move afinfo around libxtables should not rely on the program executable providing the magic constants for using [gs]etsockopt. Signed-off-by: Jan Engelhardt --- ip6tables-standalone.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ip6tables-standalone.c') diff --git a/ip6tables-standalone.c b/ip6tables-standalone.c index 3ab114ea..cea48186 100644 --- a/ip6tables-standalone.c +++ b/ip6tables-standalone.c @@ -54,6 +54,7 @@ main(int argc, char *argv[]) xtables_program_name = program_name; xtables_init(); + xtables_set_nfproto(NFPROTO_IPV6); #ifdef NO_SHARED_LIBS init_extensions(); #endif -- cgit v1.2.3