summaryrefslogtreecommitdiffstats
path: root/iptables
diff options
context:
space:
mode:
Diffstat (limited to 'iptables')
-rw-r--r--iptables/ip6tables-restore.c6
-rw-r--r--iptables/iptables-restore.c6
-rw-r--r--iptables/iptables-xml.c7
-rw-r--r--iptables/nft-shared.h5
-rw-r--r--iptables/xshared.h6
-rw-r--r--iptables/xtables-restore.c6
6 files changed, 8 insertions, 28 deletions
diff --git a/iptables/ip6tables-restore.c b/iptables/ip6tables-restore.c
index d36f92da..3065768e 100644
--- a/iptables/ip6tables-restore.c
+++ b/iptables/ip6tables-restore.c
@@ -20,12 +20,6 @@
#include "libiptc/libip6tc.h"
#include "ip6tables-multi.h"
-#ifdef DEBUG
-#define DEBUGP(x, args...) fprintf(stderr, x, ## args)
-#else
-#define DEBUGP(x, args...)
-#endif
-
static int counters, verbose, noflush, wait;
static struct timeval wait_interval = {
diff --git a/iptables/iptables-restore.c b/iptables/iptables-restore.c
index 142ddb82..e52e8e47 100644
--- a/iptables/iptables-restore.c
+++ b/iptables/iptables-restore.c
@@ -17,12 +17,6 @@
#include "libiptc/libiptc.h"
#include "iptables-multi.h"
-#ifdef DEBUG
-#define DEBUGP(x, args...) fprintf(stderr, x, ## args)
-#else
-#define DEBUGP(x, args...)
-#endif
-
static int counters, verbose, noflush, wait;
static struct timeval wait_interval = {
diff --git a/iptables/iptables-xml.c b/iptables/iptables-xml.c
index 69c19a60..a1b09f3a 100644
--- a/iptables/iptables-xml.c
+++ b/iptables/iptables-xml.c
@@ -16,12 +16,7 @@
#include "libiptc/libiptc.h"
#include "xtables-multi.h"
#include <xtables.h>
-
-#ifdef DEBUG
-#define DEBUGP(x, args...) fprintf(stderr, x, ## args)
-#else
-#define DEBUGP(x, args...)
-#endif
+#include "xshared.h"
struct xtables_globals iptables_xml_globals = {
.option_offset = 0,
diff --git a/iptables/nft-shared.h b/iptables/nft-shared.h
index 882f60e8..5ef17a08 100644
--- a/iptables/nft-shared.h
+++ b/iptables/nft-shared.h
@@ -11,12 +11,9 @@
#include "xshared.h"
-#if 0
-#define DEBUGP(x, args...) fprintf(stdout, x, ## args)
+#ifdef DEBUG
#define NLDEBUG
#define DEBUG_DEL
-#else
-#define DEBUGP(x, args...)
#endif
/*
diff --git a/iptables/xshared.h b/iptables/xshared.h
index 533c5268..363549db 100644
--- a/iptables/xshared.h
+++ b/iptables/xshared.h
@@ -10,6 +10,12 @@
#include <linux/netfilter_ipv4/ip_tables.h>
#include <linux/netfilter_ipv6/ip6_tables.h>
+#ifdef DEBUG
+#define DEBUGP(x, args...) fprintf(stdout, x, ## args)
+#else
+#define DEBUGP(x, args...)
+#endif
+
enum {
OPT_NONE = 0,
OPT_NUMERIC = 1 << 0,
diff --git a/iptables/xtables-restore.c b/iptables/xtables-restore.c
index 5c0ae98e..0a3d1a31 100644
--- a/iptables/xtables-restore.c
+++ b/iptables/xtables-restore.c
@@ -19,12 +19,6 @@
#include "nft-bridge.h"
#include <libnftnl/chain.h>
-#ifdef DEBUG
-#define DEBUGP(x, args...) fprintf(stderr, x, ## args)
-#else
-#define DEBUGP(x, args...)
-#endif
-
static int counters, verbose, noflush;
/* Keeping track of external matches and targets. */