[PATCH 1/2] netfilter: change NF_ASSERT to WARN_ON

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change netfilter asserts to standard WARN_ON. This has the
benefit of backtrace info and also causes netfilter errors
to show up on kerneloops.org.

Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxxxx>

--- a/net/ipv4/netfilter/ip_tables.c	2010-05-11 21:08:46.929331436 -0700
+++ b/net/ipv4/netfilter/ip_tables.c	2010-05-12 08:27:47.444262585 -0700
@@ -51,12 +51,7 @@ MODULE_DESCRIPTION("IPv4 packet filter")
 #endif
 
 #ifdef CONFIG_NETFILTER_DEBUG
-#define IP_NF_ASSERT(x)						\
-do {								\
-	if (!(x))						\
-		printk("IP_NF_ASSERT: %s:%s:%u\n",		\
-		       __func__, __FILE__, __LINE__);	\
-} while(0)
+#define IP_NF_ASSERT(x)		WARN_ON(!(x))
 #else
 #define IP_NF_ASSERT(x)
 #endif
--- a/net/ipv4/netfilter/arp_tables.c	2010-05-11 21:08:47.259329948 -0700
+++ b/net/ipv4/netfilter/arp_tables.c	2010-05-12 08:27:47.514379906 -0700
@@ -49,12 +49,7 @@ MODULE_DESCRIPTION("arptables core");
 #endif
 
 #ifdef CONFIG_NETFILTER_DEBUG
-#define ARP_NF_ASSERT(x)					\
-do {								\
-	if (!(x))						\
-		printk("ARP_NF_ASSERT: %s:%s:%u\n",		\
-		       __func__, __FILE__, __LINE__);	\
-} while(0)
+#define ARP_NF_ASSERT(x)	WARN_ON(!(x))
 #else
 #define ARP_NF_ASSERT(x)
 #endif
--- a/net/ipv6/netfilter/ip6_tables.c	2010-05-11 21:08:35.787720711 -0700
+++ b/net/ipv6/netfilter/ip6_tables.c	2010-05-12 08:27:47.384369744 -0700
@@ -52,12 +52,7 @@ MODULE_DESCRIPTION("IPv6 packet filter")
 #endif
 
 #ifdef CONFIG_NETFILTER_DEBUG
-#define IP_NF_ASSERT(x)						\
-do {								\
-	if (!(x))						\
-		printk("IP_NF_ASSERT: %s:%s:%u\n",		\
-		       __func__, __FILE__, __LINE__);	\
-} while(0)
+#define IP_NF_ASSERT(x)	WARN_ON(!(x))
 #else
 #define IP_NF_ASSERT(x)
 #endif


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux