Commit af5676039a9479e6ff42c6aab9fac1149ac9597f

Authored by Stephen Hemminger
Committed by Patrick McHardy
1 parent e94c67436e

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>

Showing 3 changed files with 3 additions and 18 deletions Side-by-side Diff

net/ipv4/netfilter/arp_tables.c
... ... @@ -49,12 +49,7 @@
49 49 #endif
50 50  
51 51 #ifdef CONFIG_NETFILTER_DEBUG
52   -#define ARP_NF_ASSERT(x) \
53   -do { \
54   - if (!(x)) \
55   - printk("ARP_NF_ASSERT: %s:%s:%u\n", \
56   - __func__, __FILE__, __LINE__); \
57   -} while(0)
  52 +#define ARP_NF_ASSERT(x) WARN_ON(!(x))
58 53 #else
59 54 #define ARP_NF_ASSERT(x)
60 55 #endif
net/ipv4/netfilter/ip_tables.c
... ... @@ -51,12 +51,7 @@
51 51 #endif
52 52  
53 53 #ifdef CONFIG_NETFILTER_DEBUG
54   -#define IP_NF_ASSERT(x) \
55   -do { \
56   - if (!(x)) \
57   - printk("IP_NF_ASSERT: %s:%s:%u\n", \
58   - __func__, __FILE__, __LINE__); \
59   -} while(0)
  54 +#define IP_NF_ASSERT(x) WARN_ON(!(x))
60 55 #else
61 56 #define IP_NF_ASSERT(x)
62 57 #endif
net/ipv6/netfilter/ip6_tables.c
... ... @@ -52,12 +52,7 @@
52 52 #endif
53 53  
54 54 #ifdef CONFIG_NETFILTER_DEBUG
55   -#define IP_NF_ASSERT(x) \
56   -do { \
57   - if (!(x)) \
58   - printk("IP_NF_ASSERT: %s:%s:%u\n", \
59   - __func__, __FILE__, __LINE__); \
60   -} while(0)
  55 +#define IP_NF_ASSERT(x) WARN_ON(!(x))
61 56 #else
62 57 #define IP_NF_ASSERT(x)
63 58 #endif