提交 6c4a5cb2 编写于 作者: J Joe Perches 提交者: David S. Miller

net: filter: Use WARN_RATELIMIT

A mis-configured filter can spam the logs with lots of stack traces.

Rate-limit the warnings and add printout of the bogus filter information.
Original-patch-by: NBen Greear <greearb@candelatech.com>
Signed-off-by: NJoe Perches <joe@perches.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b3eec79b
......@@ -350,7 +350,9 @@ unsigned int sk_run_filter(const struct sk_buff *skb,
continue;
}
default:
WARN_ON(1);
WARN_RATELIMIT(1, "Unknown code:%u jt:%u tf:%u k:%u\n",
fentry->code, fentry->jt,
fentry->jf, fentry->k);
return 0;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册