netfilter: change NF_ASSERT to WARN_ON
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 13 May 2010 13:00:20 +0000 (15:00 +0200)
committerPatrick McHardy <kaber@trash.net>
Thu, 13 May 2010 13:00:20 +0000 (15:00 +0200)
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@vyatta.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv4/netfilter/arp_tables.c
net/ipv4/netfilter/ip_tables.c
net/ipv6/netfilter/ip6_tables.c

index 03352fcba1720c48bfd9e5f202e1addf6cf73454..65f2944b5a6413ab112eefc0e8a4e610fa751388 100644 (file)
@@ -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
index 49b9e4fb54600d4775fd719001b33b1e29fda04d..ad702bc34e75e6c43d32484145ec43c15bfafc02 100644 (file)
@@ -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
index 56782336474fcce14804fbd99902c6bc1b4cb7e3..02a7db025d0f50371a2b059936b1e81be5ddf6d5 100644 (file)
@@ -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