diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2010-05-13 09:00:20 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-05-13 09:00:20 -0400 |
commit | af5676039a9479e6ff42c6aab9fac1149ac9597f (patch) | |
tree | 23286e7ee0f2fd28ba267e7488367ee84fd83322 | |
parent | e94c67436efa22af7d8b7d19c885863246042543 (diff) |
netfilter: change NF_ASSERT to WARN_ON
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>
-rw-r--r-- | net/ipv4/netfilter/arp_tables.c | 7 | ||||
-rw-r--r-- | net/ipv4/netfilter/ip_tables.c | 7 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 7 |
3 files changed, 3 insertions, 18 deletions
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c index 03352fcba172..65f2944b5a64 100644 --- a/net/ipv4/netfilter/arp_tables.c +++ b/net/ipv4/netfilter/arp_tables.c | |||
@@ -49,12 +49,7 @@ MODULE_DESCRIPTION("arptables core"); | |||
49 | #endif | 49 | #endif |
50 | 50 | ||
51 | #ifdef CONFIG_NETFILTER_DEBUG | 51 | #ifdef CONFIG_NETFILTER_DEBUG |
52 | #define ARP_NF_ASSERT(x) \ | 52 | #define ARP_NF_ASSERT(x) WARN_ON(!(x)) |
53 | do { \ | ||
54 | if (!(x)) \ | ||
55 | printk("ARP_NF_ASSERT: %s:%s:%u\n", \ | ||
56 | __func__, __FILE__, __LINE__); \ | ||
57 | } while(0) | ||
58 | #else | 53 | #else |
59 | #define ARP_NF_ASSERT(x) | 54 | #define ARP_NF_ASSERT(x) |
60 | #endif | 55 | #endif |
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c index 49b9e4fb5460..ad702bc34e75 100644 --- a/net/ipv4/netfilter/ip_tables.c +++ b/net/ipv4/netfilter/ip_tables.c | |||
@@ -51,12 +51,7 @@ MODULE_DESCRIPTION("IPv4 packet filter"); | |||
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #ifdef CONFIG_NETFILTER_DEBUG | 53 | #ifdef CONFIG_NETFILTER_DEBUG |
54 | #define IP_NF_ASSERT(x) \ | 54 | #define IP_NF_ASSERT(x) WARN_ON(!(x)) |
55 | do { \ | ||
56 | if (!(x)) \ | ||
57 | printk("IP_NF_ASSERT: %s:%s:%u\n", \ | ||
58 | __func__, __FILE__, __LINE__); \ | ||
59 | } while(0) | ||
60 | #else | 55 | #else |
61 | #define IP_NF_ASSERT(x) | 56 | #define IP_NF_ASSERT(x) |
62 | #endif | 57 | #endif |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 56782336474f..02a7db025d0f 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -52,12 +52,7 @@ MODULE_DESCRIPTION("IPv6 packet filter"); | |||
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | #ifdef CONFIG_NETFILTER_DEBUG | 54 | #ifdef CONFIG_NETFILTER_DEBUG |
55 | #define IP_NF_ASSERT(x) \ | 55 | #define IP_NF_ASSERT(x) WARN_ON(!(x)) |
56 | do { \ | ||
57 | if (!(x)) \ | ||
58 | printk("IP_NF_ASSERT: %s:%s:%u\n", \ | ||
59 | __func__, __FILE__, __LINE__); \ | ||
60 | } while(0) | ||
61 | #else | 56 | #else |
62 | #define IP_NF_ASSERT(x) | 57 | #define IP_NF_ASSERT(x) |
63 | #endif | 58 | #endif |