Skip to content

Commit

Permalink
netfilter: change NF_ASSERT to WARN_ON
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephen Hemminger authored and Patrick McHardy committed May 13, 2010
1 parent e94c674 commit af56760
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
7 changes: 1 addition & 6 deletions net/ipv4/netfilter/arp_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions net/ipv4/netfilter/ip_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions net/ipv6/netfilter/ip6_tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit af56760

Please sign in to comment.