* [PATCH 1/8] libxtables: recognize IP6TABLES_LIB_DIR old-style environment variable
2009-02-11 15:03 pull request jengelh
@ 2009-02-11 15:03 ` jengelh
2009-02-11 15:03 ` [PATCH 2/8] build: move -ldl to proper LDADD jengelh
` (8 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: jengelh @ 2009-02-11 15:03 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber
From: Jan Engelhardt <jengelh@medozas.de>
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 <jengelh@medozas.de>
---
xtables.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/xtables.c b/xtables.c
index 6c95475..c898889 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;
}
--
1.6.1.2
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 2/8] build: move -ldl to proper LDADD
2009-02-11 15:03 pull request jengelh
2009-02-11 15:03 ` [PATCH 1/8] libxtables: recognize IP6TABLES_LIB_DIR old-style environment variable jengelh
@ 2009-02-11 15:03 ` jengelh
2009-02-11 15:03 ` [PATCH 3/8] libxtables: remove unused XT_LIB_DIR macro jengelh
` (7 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: jengelh @ 2009-02-11 15:03 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber
From: Jan Engelhardt <jengelh@medozas.de>
libxtables uses dlopen, so *it* has to use -ldl, not the main program.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
Makefile.am | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 0ffb978..2348976 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,11 +15,12 @@ libiptc_libiptc_a_SOURCES = libiptc/libip4tc.c libiptc/libip6tc.c
lib_LTLIBRARIES = libxtables.la
libxtables_la_SOURCES = xtables.c
libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage}
+libxtables_la_LIBADD = -ldl
# iptables, dynamic
iptables_SOURCES = iptables-standalone.c iptables.c
iptables_LDFLAGS = -rdynamic
-iptables_LDADD = -ldl -lm libiptc/libiptc.a extensions/libext4.a libxtables.la
+iptables_LDADD = -lm libiptc/libiptc.a extensions/libext4.a libxtables.la
iptables_multi_SOURCES = iptables-multi.c iptables-save.c \
iptables-restore.c iptables-xml.c \
@@ -46,7 +47,7 @@ iptables_xml_SOURCES = iptables-xml.c
# ip6tables, dynamic
ip6tables_SOURCES = ip6tables-standalone.c ip6tables.c
ip6tables_LDFLAGS = -rdynamic
-ip6tables_LDADD = -ldl -lm libiptc/libiptc.a extensions/libext6.a libxtables.la
+ip6tables_LDADD = -lm libiptc/libiptc.a extensions/libext6.a libxtables.la
ip6tables_multi_SOURCES = ip6tables-multi.c ip6tables-save.c \
ip6tables-restore.c ip6tables-standalone.c \
--
1.6.1.2
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 3/8] libxtables: remove unused XT_LIB_DIR macro
2009-02-11 15:03 pull request jengelh
2009-02-11 15:03 ` [PATCH 1/8] libxtables: recognize IP6TABLES_LIB_DIR old-style environment variable jengelh
2009-02-11 15:03 ` [PATCH 2/8] build: move -ldl to proper LDADD jengelh
@ 2009-02-11 15:03 ` jengelh
2009-02-11 15:03 ` [PATCH 4/8] libxtables: decouple non-xtables parts from header jengelh
` (6 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: jengelh @ 2009-02-11 15:03 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber
From: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/xtables/internal.h.in | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/include/xtables/internal.h.in b/include/xtables/internal.h.in
index 81ddb48..5e34694 100644
--- a/include/xtables/internal.h.in
+++ b/include/xtables/internal.h.in
@@ -3,10 +3,6 @@
#define IPTABLES_VERSION "@PACKAGE_VERSION@"
-#ifndef XT_LIB_DIR
-# define XT_LIB_DIR "/usr/local/lib/iptables"
-#endif
-
/**
* Program's own name and version.
*/
--
1.6.1.2
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 4/8] libxtables: decouple non-xtables parts from header
2009-02-11 15:03 pull request jengelh
` (2 preceding siblings ...)
2009-02-11 15:03 ` [PATCH 3/8] libxtables: remove unused XT_LIB_DIR macro jengelh
@ 2009-02-11 15:03 ` jengelh
2009-02-11 15:03 ` [PATCH 5/8] src: remove iptables_rule_match indirection macro jengelh
` (5 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: jengelh @ 2009-02-11 15:03 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber
From: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
.gitignore | 2 +-
Makefile.am | 2 +-
configure.ac | 2 +-
include/ip6tables.h | 1 +
include/iptables.h | 1 +
include/iptables/internal.h.in | 11 +++++++++++
include/xtables.h.in | 7 ++++++-
include/xtables/internal.h.in | 13 -------------
8 files changed, 22 insertions(+), 17 deletions(-)
create mode 100644 include/iptables/internal.h.in
delete mode 100644 include/xtables/internal.h.in
diff --git a/.gitignore b/.gitignore
index 116de2c..97c3004 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,7 +18,7 @@ Makefile.in
/extensions/targets?.man
/include/xtables.h
-/include/xtables/internal.h
+/include/iptables/internal.h
/aclocal.m4
/autom4te*.cache
diff --git a/Makefile.am b/Makefile.am
index 2348976..0e24717 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -105,7 +105,7 @@ tarball:
tar -C /tmp -cjf ${PACKAGE_TARNAME}-${PACKAGE_VERSION}.tar.bz2 --owner=root --group=root ${PACKAGE_TARNAME}-${PACKAGE_VERSION}/;
rm -Rf /tmp/${PACKAGE_TARNAME}-${PACKAGE_VERSION};
-config.status: include/xtables.h.in
+config.status: include/xtables.h.in include/iptables/internal.h.in
# ldconfig may fail when we are not root (as is the case in build systems)
# so add appropriate protection that it does not let `make` fail.
diff --git a/configure.ac b/configure.ac
index bb32130..888ba42 100644
--- a/configure.ac
+++ b/configure.ac
@@ -79,5 +79,5 @@ libxtables_vmajor=$(($libxtables_vcurrent - $libxtables_vage));
AC_SUBST([libxtables_vmajor])
AC_CONFIG_FILES([Makefile extensions/GNUmakefile libipq/Makefile
- include/xtables.h include/xtables/internal.h xtables.pc])
+ include/xtables.h include/iptables/internal.h xtables.pc])
AC_OUTPUT
diff --git a/include/ip6tables.h b/include/ip6tables.h
index 1956cf0..663da9c 100644
--- a/include/ip6tables.h
+++ b/include/ip6tables.h
@@ -4,6 +4,7 @@
#include <netinet/ip.h>
#include <xtables.h>
#include <libiptc/libip6tc.h>
+#include <iptables/internal.h>
#ifndef IP6T_SO_GET_REVISION_MATCH /* Old kernel source. */
#define IP6T_SO_GET_REVISION_MATCH 68
diff --git a/include/iptables.h b/include/iptables.h
index f7ae0cc..ee769a5 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -4,6 +4,7 @@
#include <netinet/ip.h>
#include <xtables.h>
#include <libiptc/libiptc.h>
+#include <iptables/internal.h>
#ifndef IPT_SO_GET_REVISION_MATCH /* Old kernel source. */
#define IPT_SO_GET_REVISION_MATCH (IPT_BASE_CTL + 2)
diff --git a/include/iptables/internal.h.in b/include/iptables/internal.h.in
new file mode 100644
index 0000000..849e172
--- /dev/null
+++ b/include/iptables/internal.h.in
@@ -0,0 +1,11 @@
+#ifndef IPTABLES_INTERNAL_H
+#define IPTABLES_INTERNAL_H 1
+
+#define IPTABLES_VERSION "@PACKAGE_VERSION@"
+
+/**
+ * Program's own name and version.
+ */
+extern const char *program_name, *program_version;
+
+#endif /* IPTABLES_INTERNAL_H */
diff --git a/include/xtables.h.in b/include/xtables.h.in
index 02750fb..1455e9c 100644
--- a/include/xtables.h.in
+++ b/include/xtables.h.in
@@ -258,10 +258,15 @@ extern const struct xtables_pprot xtables_chain_protos[];
extern u_int16_t xtables_parse_protocol(const char *s);
#ifdef XTABLES_INTERNAL
+
+/* Shipped modules rely on this... */
+
# ifndef ARRAY_SIZE
# define ARRAY_SIZE(x) (sizeof(x) / sizeof(*(x)))
# endif
-# include <xtables/internal.h>
+
+extern void _init(void);
+
#endif
#endif /* _XTABLES_H */
diff --git a/include/xtables/internal.h.in b/include/xtables/internal.h.in
deleted file mode 100644
index 5e34694..0000000
--- a/include/xtables/internal.h.in
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _XTABLES_INTERNAL_H
-#define _XTABLES_INTERNAL_H 1
-
-#define IPTABLES_VERSION "@PACKAGE_VERSION@"
-
-/**
- * Program's own name and version.
- */
-extern const char *program_name, *program_version;
-
-extern void _init(void);
-
-#endif /* _XTABLES_INTERNAL_H */
--
1.6.1.2
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 5/8] src: remove iptables_rule_match indirection macro
2009-02-11 15:03 pull request jengelh
` (3 preceding siblings ...)
2009-02-11 15:03 ` [PATCH 4/8] libxtables: decouple non-xtables parts from header jengelh
@ 2009-02-11 15:03 ` jengelh
2009-02-11 15:03 ` [PATCH 6/8] src: remove unused ipt_tryload macro jengelh
` (4 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: jengelh @ 2009-02-11 15:03 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber
From: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/ip6tables.h | 1 -
include/iptables.h | 1 -
ip6tables.c | 24 ++++++++++++------------
iptables.c | 24 ++++++++++++------------
4 files changed, 24 insertions(+), 26 deletions(-)
diff --git a/include/ip6tables.h b/include/ip6tables.h
index 663da9c..52e290c 100644
--- a/include/ip6tables.h
+++ b/include/ip6tables.h
@@ -11,7 +11,6 @@
#define IP6T_SO_GET_REVISION_TARGET 69
#endif /* IP6T_SO_GET_REVISION_MATCH Old kernel source */
-#define ip6tables_rule_match xtables_rule_match
#define ip6t_tryload xt_tryload
extern int line;
diff --git a/include/iptables.h b/include/iptables.h
index ee769a5..74b244e 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -11,7 +11,6 @@
#define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3)
#endif /* IPT_SO_GET_REVISION_MATCH Old kernel source */
-#define iptables_rule_match xtables_rule_match
#define ipt_tryload xt_tryload
extern int line;
diff --git a/ip6tables.c b/ip6tables.c
index 233974f..7fff492 100644
--- a/ip6tables.c
+++ b/ip6tables.c
@@ -239,9 +239,9 @@ exit_tryhelp(int status)
}
static void
-exit_printhelp(struct ip6tables_rule_match *matches)
+exit_printhelp(struct xtables_rule_match *matches)
{
- struct ip6tables_rule_match *matchp = NULL;
+ struct xtables_rule_match *matchp = NULL;
struct xtables_target *t = NULL;
printf("%s v%s\n\n"
@@ -426,7 +426,7 @@ add_command(unsigned int *cmd, const int newcmd, const int othercmds,
/* Christophe Burki wants `-p 6' to imply `-m tcp'. */
static struct xtables_match *
find_proto(const char *pname, enum xtables_tryload tryload,
- int nolookup, struct ip6tables_rule_match **matches)
+ int nolookup, struct xtables_rule_match **matches)
{
unsigned int proto;
@@ -839,11 +839,11 @@ insert_entry(const ip6t_chainlabel chain,
}
static unsigned char *
-make_delete_mask(struct ip6t_entry *fw, struct ip6tables_rule_match *matches)
+make_delete_mask(struct ip6t_entry *fw, struct xtables_rule_match *matches)
{
/* Establish mask for comparison */
unsigned int size;
- struct ip6tables_rule_match *matchp;
+ struct xtables_rule_match *matchp;
unsigned char *mask, *mptr;
size = sizeof(struct ip6t_entry);
@@ -880,7 +880,7 @@ delete_entry(const ip6t_chainlabel chain,
const struct in6_addr daddrs[],
int verbose,
struct ip6tc_handle *handle,
- struct ip6tables_rule_match *matches)
+ struct xtables_rule_match *matches)
{
unsigned int i, j;
int ret = 1;
@@ -1271,11 +1271,11 @@ list_rules(const ip6t_chainlabel chain, int rulenum, int counters,
static struct ip6t_entry *
generate_entry(const struct ip6t_entry *fw,
- struct ip6tables_rule_match *matches,
+ struct xtables_rule_match *matches,
struct ip6t_entry_target *target)
{
unsigned int size;
- struct ip6tables_rule_match *matchp;
+ struct xtables_rule_match *matchp;
struct ip6t_entry *e;
size = sizeof(struct ip6t_entry);
@@ -1297,9 +1297,9 @@ generate_entry(const struct ip6t_entry *fw,
return e;
}
-static void clear_rule_matches(struct ip6tables_rule_match **matches)
+static void clear_rule_matches(struct xtables_rule_match **matches)
{
- struct ip6tables_rule_match *matchp, *tmp;
+ struct xtables_rule_match *matchp, *tmp;
for (matchp = *matches; matchp;) {
tmp = matchp->next;
@@ -1342,8 +1342,8 @@ int do_command6(int argc, char *argv[], char **table, struct ip6tc_handle **hand
const char *pcnt = NULL, *bcnt = NULL;
int ret = 1;
struct xtables_match *m;
- struct ip6tables_rule_match *matches = NULL;
- struct ip6tables_rule_match *matchp;
+ struct xtables_rule_match *matches = NULL;
+ struct xtables_rule_match *matchp;
struct xtables_target *target = NULL;
struct xtables_target *t;
const char *jumpto = "";
diff --git a/iptables.c b/iptables.c
index f1a5d33..b063823 100644
--- a/iptables.c
+++ b/iptables.c
@@ -250,9 +250,9 @@ exit_tryhelp(int status)
}
static void
-exit_printhelp(struct iptables_rule_match *matches)
+exit_printhelp(struct xtables_rule_match *matches)
{
- struct iptables_rule_match *matchp = NULL;
+ struct xtables_rule_match *matchp = NULL;
struct xtables_target *t = NULL;
printf("%s v%s\n\n"
@@ -437,7 +437,7 @@ add_command(unsigned int *cmd, const int newcmd, const int othercmds,
/* Christophe Burki wants `-p 6' to imply `-m tcp'. */
static struct xtables_match *
find_proto(const char *pname, enum xtables_tryload tryload,
- int nolookup, struct iptables_rule_match **matches)
+ int nolookup, struct xtables_rule_match **matches)
{
unsigned int proto;
@@ -841,11 +841,11 @@ insert_entry(const ipt_chainlabel chain,
}
static unsigned char *
-make_delete_mask(struct ipt_entry *fw, struct iptables_rule_match *matches)
+make_delete_mask(struct ipt_entry *fw, struct xtables_rule_match *matches)
{
/* Establish mask for comparison */
unsigned int size;
- struct iptables_rule_match *matchp;
+ struct xtables_rule_match *matchp;
unsigned char *mask, *mptr;
size = sizeof(struct ipt_entry);
@@ -882,7 +882,7 @@ delete_entry(const ipt_chainlabel chain,
const struct in_addr daddrs[],
int verbose,
struct iptc_handle *handle,
- struct iptables_rule_match *matches)
+ struct xtables_rule_match *matches)
{
unsigned int i, j;
int ret = 1;
@@ -1279,11 +1279,11 @@ list_rules(const ipt_chainlabel chain, int rulenum, int counters,
static struct ipt_entry *
generate_entry(const struct ipt_entry *fw,
- struct iptables_rule_match *matches,
+ struct xtables_rule_match *matches,
struct ipt_entry_target *target)
{
unsigned int size;
- struct iptables_rule_match *matchp;
+ struct xtables_rule_match *matchp;
struct ipt_entry *e;
size = sizeof(struct ipt_entry);
@@ -1305,9 +1305,9 @@ generate_entry(const struct ipt_entry *fw,
return e;
}
-static void clear_rule_matches(struct iptables_rule_match **matches)
+static void clear_rule_matches(struct xtables_rule_match **matches)
{
- struct iptables_rule_match *matchp, *tmp;
+ struct xtables_rule_match *matchp, *tmp;
for (matchp = *matches; matchp;) {
tmp = matchp->next;
@@ -1364,8 +1364,8 @@ int do_command(int argc, char *argv[], char **table, struct iptc_handle **handle
const char *pcnt = NULL, *bcnt = NULL;
int ret = 1;
struct xtables_match *m;
- struct iptables_rule_match *matches = NULL;
- struct iptables_rule_match *matchp;
+ struct xtables_rule_match *matches = NULL;
+ struct xtables_rule_match *matchp;
struct xtables_target *target = NULL;
struct xtables_target *t;
const char *jumpto = "";
--
1.6.1.2
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 6/8] src: remove unused ipt_tryload macro
2009-02-11 15:03 pull request jengelh
` (4 preceding siblings ...)
2009-02-11 15:03 ` [PATCH 5/8] src: remove iptables_rule_match indirection macro jengelh
@ 2009-02-11 15:03 ` jengelh
2009-02-11 15:03 ` [PATCH 7/8] libxtables: move compat defines to xtables.c jengelh
` (3 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: jengelh @ 2009-02-11 15:03 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber
From: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/ip6tables.h | 2 --
include/iptables.h | 2 --
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/include/ip6tables.h b/include/ip6tables.h
index 52e290c..b8478d4 100644
--- a/include/ip6tables.h
+++ b/include/ip6tables.h
@@ -11,8 +11,6 @@
#define IP6T_SO_GET_REVISION_TARGET 69
#endif /* IP6T_SO_GET_REVISION_MATCH Old kernel source */
-#define ip6t_tryload xt_tryload
-
extern int line;
/* Your shared library should call one of these. */
diff --git a/include/iptables.h b/include/iptables.h
index 74b244e..963905a 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -11,8 +11,6 @@
#define IPT_SO_GET_REVISION_TARGET (IPT_BASE_CTL + 3)
#endif /* IPT_SO_GET_REVISION_MATCH Old kernel source */
-#define ipt_tryload xt_tryload
-
extern int line;
/* Your shared library should call one of these. */
--
1.6.1.2
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 7/8] libxtables: move compat defines to xtables.c
2009-02-11 15:03 pull request jengelh
` (5 preceding siblings ...)
2009-02-11 15:03 ` [PATCH 6/8] src: remove unused ipt_tryload macro jengelh
@ 2009-02-11 15:03 ` jengelh
2009-02-11 15:03 ` [PATCH 8/8] src: consolidate duplicate code in iptables/internal.h jengelh
` (2 subsequent siblings)
9 siblings, 0 replies; 29+ messages in thread
From: jengelh @ 2009-02-11 15:03 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber
From: Jan Engelhardt <jengelh@medozas.de>
Addendum to commit v1.4.3-rc1-41-g77f48c2 where the macro users
got moved.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/ip6tables.h | 5 -----
include/iptables.h | 5 -----
xtables.c | 9 +++++++++
3 files changed, 9 insertions(+), 10 deletions(-)
diff --git a/include/ip6tables.h b/include/ip6tables.h
index b8478d4..98f2da5 100644
--- a/include/ip6tables.h
+++ b/include/ip6tables.h
@@ -6,11 +6,6 @@
#include <libiptc/libip6tc.h>
#include <iptables/internal.h>
-#ifndef IP6T_SO_GET_REVISION_MATCH /* Old kernel source. */
-#define IP6T_SO_GET_REVISION_MATCH 68
-#define IP6T_SO_GET_REVISION_TARGET 69
-#endif /* IP6T_SO_GET_REVISION_MATCH Old kernel source */
-
extern int line;
/* Your shared library should call one of these. */
diff --git a/include/iptables.h b/include/iptables.h
index 963905a..d309059 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -6,11 +6,6 @@
#include <libiptc/libiptc.h>
#include <iptables/internal.h>
-#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 /* IPT_SO_GET_REVISION_MATCH Old kernel source */
-
extern int line;
/* Your shared library should call one of these. */
diff --git a/xtables.c b/xtables.c
index c898889..3c89a9d 100644
--- a/xtables.c
+++ b/xtables.c
@@ -39,6 +39,15 @@
#ifndef NO_SHARED_LIBS
#include <dlfcn.h>
#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
--
1.6.1.2
^ permalink raw reply related [flat|nested] 29+ messages in thread
* [PATCH 8/8] src: consolidate duplicate code in iptables/internal.h
2009-02-11 15:03 pull request jengelh
` (6 preceding siblings ...)
2009-02-11 15:03 ` [PATCH 7/8] libxtables: move compat defines to xtables.c jengelh
@ 2009-02-11 15:03 ` jengelh
2009-02-11 15:06 ` pull request Patrick McHardy
2009-02-12 5:29 ` Patrick McHardy
9 siblings, 0 replies; 29+ messages in thread
From: jengelh @ 2009-02-11 15:03 UTC (permalink / raw)
To: netfilter-devel; +Cc: kaber
From: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
include/ip6tables.h | 2 --
include/iptables.h | 2 --
include/iptables/internal.h.in | 2 ++
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/ip6tables.h b/include/ip6tables.h
index 98f2da5..86587e6 100644
--- a/include/ip6tables.h
+++ b/include/ip6tables.h
@@ -6,8 +6,6 @@
#include <libiptc/libip6tc.h>
#include <iptables/internal.h>
-extern int line;
-
/* Your shared library should call one of these. */
extern int do_command6(int argc, char *argv[], char **table,
struct ip6tc_handle **handle);
diff --git a/include/iptables.h b/include/iptables.h
index d309059..f0aa345 100644
--- a/include/iptables.h
+++ b/include/iptables.h
@@ -6,8 +6,6 @@
#include <libiptc/libiptc.h>
#include <iptables/internal.h>
-extern int line;
-
/* Your shared library should call one of these. */
extern int do_command(int argc, char *argv[], char **table,
struct iptc_handle **handle);
diff --git a/include/iptables/internal.h.in b/include/iptables/internal.h.in
index 849e172..8568e58 100644
--- a/include/iptables/internal.h.in
+++ b/include/iptables/internal.h.in
@@ -8,4 +8,6 @@
*/
extern const char *program_name, *program_version;
+extern int line;
+
#endif /* IPTABLES_INTERNAL_H */
--
1.6.1.2
^ permalink raw reply related [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-11 15:03 pull request jengelh
` (7 preceding siblings ...)
2009-02-11 15:03 ` [PATCH 8/8] src: consolidate duplicate code in iptables/internal.h jengelh
@ 2009-02-11 15:06 ` Patrick McHardy
2009-02-11 15:45 ` Jan Engelhardt
2009-02-12 5:29 ` Patrick McHardy
9 siblings, 1 reply; 29+ messages in thread
From: Patrick McHardy @ 2009-02-11 15:06 UTC (permalink / raw)
To: jengelh; +Cc: netfilter-devel
jengelh@medozas.de wrote:
> Please pull from
> git://dev.medozas.de/iptables master
> to recive
> Jan Engelhardt (8):
> libxtables: recognize IP6TABLES_LIB_DIR old-style environment variable
> build: move -ldl to proper LDADD
> libxtables: remove unused XT_LIB_DIR macro
> libxtables: decouple non-xtables parts from header
> src: remove iptables_rule_match indirection macro
> src: remove unused ipt_tryload macro
> libxtables: move compat defines to xtables.c
> src: consolidate duplicate code in iptables/internal.h
How do these interact with the Jamal's pending changes?
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-11 15:06 ` pull request Patrick McHardy
@ 2009-02-11 15:45 ` Jan Engelhardt
2009-02-11 23:40 ` Jan Engelhardt
0 siblings, 1 reply; 29+ messages in thread
From: Jan Engelhardt @ 2009-02-11 15:45 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel
On Wednesday 2009-02-11 16:06, Patrick McHardy wrote:
> jengelh@medozas.de wrote:
>> Please pull from
>> git://dev.medozas.de/iptables master
>> to recive
>> Jan Engelhardt (8):
>> libxtables: recognize IP6TABLES_LIB_DIR old-style environment variable
>> build: move -ldl to proper LDADD
>> libxtables: remove unused XT_LIB_DIR macro
>> libxtables: decouple non-xtables parts from header
>> src: remove iptables_rule_match indirection macro
>> src: remove unused ipt_tryload macro
>> libxtables: move compat defines to xtables.c
>> src: consolidate duplicate code in iptables/internal.h
>
> How do these interact with the Jamal's pending changes?
I think it should be fine as I am changing just the periphery here.
If it merges without git-pull stopping, after you applied his,
it's probably ok :)
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-11 15:45 ` Jan Engelhardt
@ 2009-02-11 23:40 ` Jan Engelhardt
2009-02-12 5:11 ` Patrick McHardy
0 siblings, 1 reply; 29+ messages in thread
From: Jan Engelhardt @ 2009-02-11 23:40 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel
On Wednesday 2009-02-11 16:45, Jan Engelhardt wrote:
>On Wednesday 2009-02-11 16:06, Patrick McHardy wrote:
>> jengelh@medozas.de wrote:
>>> Please pull from
>>> git://dev.medozas.de/iptables master
>>> to recive
>>> Jan Engelhardt (8):
>>> libxtables: recognize IP6TABLES_LIB_DIR old-style environment variable
>>> build: move -ldl to proper LDADD
>>> libxtables: remove unused XT_LIB_DIR macro
>>> libxtables: decouple non-xtables parts from header
>>> src: remove iptables_rule_match indirection macro
>>> src: remove unused ipt_tryload macro
>>> libxtables: move compat defines to xtables.c
>>> src: consolidate duplicate code in iptables/internal.h
>>
>> How do these interact with the Jamal's pending changes?
>
>I think it should be fine as I am changing just the periphery here.
>If it merges without git-pull stopping, after you applied his,
>it's probably ok :)
>
OTOH, I suggest you could do it like Linus [states in his Git
presentation at Google], that is, merging whatever happens to be
first in the mailbox. I think that the statistical distribution
is equal anyway.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-11 23:40 ` Jan Engelhardt
@ 2009-02-12 5:11 ` Patrick McHardy
2009-02-12 5:40 ` Jan Engelhardt
0 siblings, 1 reply; 29+ messages in thread
From: Patrick McHardy @ 2009-02-12 5:11 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
Jan Engelhardt wrote:
> On Wednesday 2009-02-11 16:45, Jan Engelhardt wrote:
>> On Wednesday 2009-02-11 16:06, Patrick McHardy wrote:
>>> How do these interact with the Jamal's pending changes?
>> I think it should be fine as I am changing just the periphery here.
>> If it merges without git-pull stopping, after you applied his,
>> it's probably ok :)
>>
> OTOH, I suggest you could do it like Linus [states in his Git
> presentation at Google], that is, merging whatever happens to be
> first in the mailbox. I think that the statistical distribution
> is equal anyway.
Thats why I'm asking. He was first so it would only be fair to
apply his patches first. Your's are more though so might be more
work to fix up. The easiest way might be if you apply Jamal's
patches and I simply pull everything from you. You seem to have
more remarks about these patches than me anyways :)
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-12 5:11 ` Patrick McHardy
@ 2009-02-12 5:40 ` Jan Engelhardt
2009-02-12 5:45 ` Patrick McHardy
0 siblings, 1 reply; 29+ messages in thread
From: Jan Engelhardt @ 2009-02-12 5:40 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel
On Thursday 2009-02-12 06:11, Patrick McHardy wrote:
>>>> How do these interact with the Jamal's pending changes?
>>> I think it should be fine as I am changing just the periphery here.
>>> If it merges without git-pull stopping, after you applied his,
>>> it's probably ok :)
>>>
>> OTOH, I suggest you could do it like Linus [states in his Git
>> presentation at Google], that is, merging whatever happens to be
>> first in the mailbox. I think that the statistical distribution
>> is equal anyway.
>
> Thats why I'm asking. He was first so it would only be fair to
> apply his patches first. Your's are more though so might be more
> work to fix up. The easiest way might be if you apply Jamal's
> patches and I simply pull everything from you. You seem to have
> more remarks about these patches than me anyways :)
>
Maybe I suggested too much :p
But yeah, why not.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-12 5:40 ` Jan Engelhardt
@ 2009-02-12 5:45 ` Patrick McHardy
0 siblings, 0 replies; 29+ messages in thread
From: Patrick McHardy @ 2009-02-12 5:45 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
Jan Engelhardt wrote:
> On Thursday 2009-02-12 06:11, Patrick McHardy wrote:
>>>>> How do these interact with the Jamal's pending changes?
>>>> I think it should be fine as I am changing just the periphery here.
>>>> If it merges without git-pull stopping, after you applied his,
>>>> it's probably ok :)
>>>>
>>> OTOH, I suggest you could do it like Linus [states in his Git
>>> presentation at Google], that is, merging whatever happens to be
>>> first in the mailbox. I think that the statistical distribution
>>> is equal anyway.
>> Thats why I'm asking. He was first so it would only be fair to
>> apply his patches first. Your's are more though so might be more
>> work to fix up. The easiest way might be if you apply Jamal's
>> patches and I simply pull everything from you. You seem to have
>> more remarks about these patches than me anyways :)
>>
> Maybe I suggested too much :p
> But yeah, why not.
Great, thanks.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-11 15:03 pull request jengelh
` (8 preceding siblings ...)
2009-02-11 15:06 ` pull request Patrick McHardy
@ 2009-02-12 5:29 ` Patrick McHardy
2009-02-12 5:33 ` Jan Engelhardt
9 siblings, 1 reply; 29+ messages in thread
From: Patrick McHardy @ 2009-02-12 5:29 UTC (permalink / raw)
To: jengelh; +Cc: netfilter-devel
jengelh@medozas.de wrote:
> .gitignore | 2 +-
> Makefile.am | 8 +-
> configure.ac | 2 +-
> include/ip6tables.h | 11 +---
> include/iptables.h | 11 +---
> include/iptables/internal.h.in | 13 ++++
> include/linux/netfilter/xt_NFLOG.h | 2 +-
> include/xtables.h.in | 22 +++-----
> include/xtables/internal.h.in | 17 ------
> ip6tables.c | 35 ++++-------
> iptables-xml.c | 19 ++++--
> iptables.c | 37 ++++--------
> xtables.c | 111 +++++++++++++-----------------------
> 13 files changed, 108 insertions(+), 182 deletions(-)
This diffstat I get looks quite different:
11 files changed, 73 insertions(+), 67 deletions(-)
Any idea whats going on there?
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-12 5:29 ` Patrick McHardy
@ 2009-02-12 5:33 ` Jan Engelhardt
2009-02-12 5:46 ` Patrick McHardy
0 siblings, 1 reply; 29+ messages in thread
From: Jan Engelhardt @ 2009-02-12 5:33 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel
On Thursday 2009-02-12 06:29, Patrick McHardy wrote:
> jengelh@medozas.de wrote:
>> 13 files changed, 108 insertions(+), 182 deletions(-)
>
> This diffstat I get looks quite different:
>
> 11 files changed, 73 insertions(+), 67 deletions(-)
>
> Any idea whats going on there?
>
I used git diff --stat instead of whatever merge outputs.
$ git diff --stat nf/master..mdz/master
[13 files, 108+, 182-]
$ git rev-parse nf/master
8b7baebc93989106fd5d26b262d0ce191f8ef7c0
$ git rev-parse mdz/master
47a6fd9ec9891a8040eb8fd6db3c5012c1056061
HTH,
Jan
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-12 5:33 ` Jan Engelhardt
@ 2009-02-12 5:46 ` Patrick McHardy
2009-02-12 6:05 ` Jan Engelhardt
0 siblings, 1 reply; 29+ messages in thread
From: Patrick McHardy @ 2009-02-12 5:46 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
Jan Engelhardt wrote:
> On Thursday 2009-02-12 06:29, Patrick McHardy wrote:
>> jengelh@medozas.de wrote:
>>> 13 files changed, 108 insertions(+), 182 deletions(-)
>> This diffstat I get looks quite different:
>>
>> 11 files changed, 73 insertions(+), 67 deletions(-)
>>
>> Any idea whats going on there?
>>
>
> I used git diff --stat instead of whatever merge outputs.
That gives the same (different) output for me.
> $ git diff --stat nf/master..mdz/master
> [13 files, 108+, 182-]
> $ git rev-parse nf/master
> 8b7baebc93989106fd5d26b262d0ce191f8ef7c0
> $ git rev-parse mdz/master
> 47a6fd9ec9891a8040eb8fd6db3c5012c1056061
Well, it doesn't add up at all, even in those changelogs you posted
f.i. the xtables.c lines amount to something in the order of 30, not
over 100. The tree looks fine from a quick look, but I want to make
sure that what I'm pulling is indeed what you intended to send me.
I'll skip this pull, please send a new request (with or without Jamal's
patches, as you like) once you figured out where those differences are
coming from.
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-12 5:46 ` Patrick McHardy
@ 2009-02-12 6:05 ` Jan Engelhardt
2009-02-12 6:10 ` Patrick McHardy
0 siblings, 1 reply; 29+ messages in thread
From: Jan Engelhardt @ 2009-02-12 6:05 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel
On Thursday 2009-02-12 06:46, Patrick McHardy wrote:
>>>> 13 files changed, 108 insertions(+), 182 deletions(-)
>>> 11 files changed, 73 insertions(+), 67 deletions(-)
>>>
>>> Any idea whats going on there?
>> I used git diff --stat instead of whatever merge outputs.
>
> That gives the same (different) output for me.
I just found out that `git diff --stat` is not the right thing to use,
at least in its form that I did. With appropraite(?) measures,
I do get the expected:
11 files changed, 73 insertions(+), 67 deletions(-)
> I'll skip this pull, please send a new request (with or without Jamal's
> patches, as you like) once you figured out where those differences are
> coming from.
Now please :)
^ permalink raw reply [flat|nested] 29+ messages in thread
* Re: pull request
2009-02-12 6:05 ` Jan Engelhardt
@ 2009-02-12 6:10 ` Patrick McHardy
0 siblings, 0 replies; 29+ messages in thread
From: Patrick McHardy @ 2009-02-12 6:10 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
Jan Engelhardt wrote:
> On Thursday 2009-02-12 06:46, Patrick McHardy wrote:
>>>>> 13 files changed, 108 insertions(+), 182 deletions(-)
>>>> 11 files changed, 73 insertions(+), 67 deletions(-)
>>>>
>>>> Any idea whats going on there?
>>> I used git diff --stat instead of whatever merge outputs.
>> That gives the same (different) output for me.
>
> I just found out that `git diff --stat` is not the right thing to use,
> at least in its form that I did. With appropraite(?) measures,
> I do get the expected:
>
> 11 files changed, 73 insertions(+), 67 deletions(-)
>
>> I'll skip this pull, please send a new request (with or without Jamal's
>> patches, as you like) once you figured out where those differences are
>> coming from.
>
> Now please :)
Pulled and pushed out, thanks Jan.
^ permalink raw reply [flat|nested] 29+ messages in thread