From ec934198bd6ee2f21171dba440ca96334b0d874b Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 10 Feb 2009 09:54:04 +0100 Subject: libxtables: recognize IP6TABLES_LIB_DIR old-style environment variable 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 --- xtables.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'xtables.c') diff --git a/xtables.c b/xtables.c index 6c954754..c8988893 100644 --- 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; } -- cgit v1.2.3 From c31870f9bebb3d4d082016fcfaf8c2177ae32eb2 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 10 Feb 2009 10:48:28 +0100 Subject: libxtables: move compat defines to xtables.c Addendum to commit v1.4.3-rc1-41-g77f48c2 where the macro users got moved. Signed-off-by: Jan Engelhardt --- xtables.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xtables.c') diff --git a/xtables.c b/xtables.c index c8988893..3c89a9d1 100644 --- a/xtables.c +++ b/xtables.c @@ -39,6 +39,15 @@ #ifndef NO_SHARED_LIBS #include #endif +#ifndef IPT_SO_GET_REVISION_MATCH /* Old kernel source. */ +# define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2) +# define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3) +#endif +#ifndef IP6T_SO_GET_REVISION_MATCH /* Old kernel source. */ +# define IP6T_SO_GET_REVISION_MATCH 68 +# define IP6T_SO_GET_REVISION_TARGET 69 +#endif + #define NPROTO 255 -- cgit v1.2.3