Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d53778e authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller
Browse files

[NETFILTER]: Convert DEBUGP to pr_debug



Convert DEBUGP to pr_debug and fix lots of non-compiling debug statements.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 342b7e3c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -4,6 +4,8 @@

#include <linux/netfilter/nf_conntrack_common.h>

extern const char *pptp_msg_name[];

/* state of the control session */
enum pptp_ctrlsess_state {
	PPTP_SESSION_NONE,			/* no session present */
+5 −5
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ struct nf_conntrack_tuple_mask
#ifdef __KERNEL__

#define NF_CT_DUMP_TUPLE(tp)						     \
DEBUGP("tuple %p: %u %u " NIP6_FMT " %hu -> " NIP6_FMT " %hu\n",	    \
pr_debug("tuple %p: %u %u " NIP6_FMT " %hu -> " NIP6_FMT " %hu\n",	     \
	 (tp), (tp)->src.l3num, (tp)->dst.protonum,			     \
	 NIP6(*(struct in6_addr *)(tp)->src.u3.all), ntohs((tp)->src.u.all), \
	 NIP6(*(struct in6_addr *)(tp)->dst.u3.all), ntohs((tp)->dst.u.all))
+10 −17
Original line number Diff line number Diff line
@@ -30,14 +30,6 @@

#define CLUSTERIP_VERSION "0.8"

#define DEBUG_CLUSTERIP

#ifdef DEBUG_CLUSTERIP
#define DEBUGP	printk
#else
#define DEBUGP
#endif

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Harald Welte <laforge@netfilter.org>");
MODULE_DESCRIPTION("iptables target for CLUSTERIP");
@@ -351,15 +343,15 @@ target(struct sk_buff **pskb,
			break;
	}

#ifdef DEBUG_CLUSTERP
#ifdef DEBUG
	DUMP_TUPLE(&ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
#endif
	DEBUGP("hash=%u ct_hash=%u ", hash, ct->mark);
	pr_debug("hash=%u ct_hash=%u ", hash, ct->mark);
	if (!clusterip_responsible(cipinfo->config, hash)) {
		DEBUGP("not responsible\n");
		pr_debug("not responsible\n");
		return NF_DROP;
	}
	DEBUGP("responsible\n");
	pr_debug("responsible\n");

	/* despite being received via linklayer multicast, this is
	 * actually a unicast IP packet. TCP doesn't like PACKET_MULTICAST */
@@ -490,7 +482,7 @@ struct arp_payload {
	__be32 dst_ip;
} __attribute__ ((packed));

#ifdef CLUSTERIP_DEBUG
#ifdef DEBUG
static void arp_print(struct arp_payload *payload)
{
#define HBUFFERLEN 30
@@ -546,8 +538,9 @@ arp_mangle(unsigned int hook,
	 * this wouldn't work, since we didn't subscribe the mcast group on
	 * other interfaces */
	if (c->dev != out) {
		DEBUGP("CLUSTERIP: not mangling arp reply on different "
		       "interface: cip'%s'-skb'%s'\n", c->dev->name, out->name);
		pr_debug("CLUSTERIP: not mangling arp reply on different "
			 "interface: cip'%s'-skb'%s'\n",
			 c->dev->name, out->name);
		clusterip_config_put(c);
		return NF_ACCEPT;
	}
@@ -555,8 +548,8 @@ arp_mangle(unsigned int hook,
	/* mangle reply hardware address */
	memcpy(payload->src_hw, c->clustermac, arp->ar_hln);

#ifdef CLUSTERIP_DEBUG
	DEBUGP(KERN_DEBUG "CLUSTERIP mangled arp reply: ");
#ifdef DEBUG
	pr_debug(KERN_DEBUG "CLUSTERIP mangled arp reply: ");
	arp_print(payload);
#endif

+3 −9
Original line number Diff line number Diff line
@@ -27,12 +27,6 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
MODULE_DESCRIPTION("iptables syslog logging module");

#if 0
#define DEBUGP printk
#else
#define DEBUGP(format, args...)
#endif

/* Use lock to serialize, so printks don't overlap */
static DEFINE_SPINLOCK(log_lock);

@@ -452,11 +446,11 @@ static bool ipt_log_checkentry(const char *tablename,
	const struct ipt_log_info *loginfo = targinfo;

	if (loginfo->level >= 8) {
		DEBUGP("LOG: level %u >= 8\n", loginfo->level);
		pr_debug("LOG: level %u >= 8\n", loginfo->level);
		return false;
	}
	if (loginfo->prefix[sizeof(loginfo->prefix)-1] != '\0') {
		DEBUGP("LOG: prefix term %i\n",
		pr_debug("LOG: prefix term %i\n",
			 loginfo->prefix[sizeof(loginfo->prefix)-1]);
		return false;
	}
+2 −8
Original line number Diff line number Diff line
@@ -27,12 +27,6 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>");
MODULE_DESCRIPTION("iptables MASQUERADE target module");

#if 0
#define DEBUGP printk
#else
#define DEBUGP(format, args...)
#endif

/* Lock protects masq region inside conntrack */
static DEFINE_RWLOCK(masq_lock);

@@ -47,11 +41,11 @@ masquerade_check(const char *tablename,
	const struct nf_nat_multi_range_compat *mr = targinfo;

	if (mr->range[0].flags & IP_NAT_RANGE_MAP_IPS) {
		DEBUGP("masquerade_check: bad MAP_IPS.\n");
		pr_debug("masquerade_check: bad MAP_IPS.\n");
		return false;
	}
	if (mr->rangesize != 1) {
		DEBUGP("masquerade_check: bad rangesize %u.\n", mr->rangesize);
		pr_debug("masquerade_check: bad rangesize %u\n", mr->rangesize);
		return false;
	}
	return true;
Loading