提交 af567603 编写于 作者: S Stephen Hemminger 提交者: Patrick McHardy

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: NStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: NPatrick McHardy <kaber@trash.net>
上级 e94c6743
...@@ -49,12 +49,7 @@ MODULE_DESCRIPTION("arptables core"); ...@@ -49,12 +49,7 @@ MODULE_DESCRIPTION("arptables core");
#endif #endif
#ifdef CONFIG_NETFILTER_DEBUG #ifdef CONFIG_NETFILTER_DEBUG
#define ARP_NF_ASSERT(x) \ #define ARP_NF_ASSERT(x) WARN_ON(!(x))
do { \
if (!(x)) \
printk("ARP_NF_ASSERT: %s:%s:%u\n", \
__func__, __FILE__, __LINE__); \
} while(0)
#else #else
#define ARP_NF_ASSERT(x) #define ARP_NF_ASSERT(x)
#endif #endif
......
...@@ -51,12 +51,7 @@ MODULE_DESCRIPTION("IPv4 packet filter"); ...@@ -51,12 +51,7 @@ MODULE_DESCRIPTION("IPv4 packet filter");
#endif #endif
#ifdef CONFIG_NETFILTER_DEBUG #ifdef CONFIG_NETFILTER_DEBUG
#define IP_NF_ASSERT(x) \ #define IP_NF_ASSERT(x) WARN_ON(!(x))
do { \
if (!(x)) \
printk("IP_NF_ASSERT: %s:%s:%u\n", \
__func__, __FILE__, __LINE__); \
} while(0)
#else #else
#define IP_NF_ASSERT(x) #define IP_NF_ASSERT(x)
#endif #endif
......
...@@ -52,12 +52,7 @@ MODULE_DESCRIPTION("IPv6 packet filter"); ...@@ -52,12 +52,7 @@ MODULE_DESCRIPTION("IPv6 packet filter");
#endif #endif
#ifdef CONFIG_NETFILTER_DEBUG #ifdef CONFIG_NETFILTER_DEBUG
#define IP_NF_ASSERT(x) \ #define IP_NF_ASSERT(x) WARN_ON(!(x))
do { \
if (!(x)) \
printk("IP_NF_ASSERT: %s:%s:%u\n", \
__func__, __FILE__, __LINE__); \
} while(0)
#else #else
#define IP_NF_ASSERT(x) #define IP_NF_ASSERT(x)
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册