Commit 6c4a5cb2 authored by Joe Perches's avatar Joe Perches Committed by 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: default avatarBen Greear <greearb@candelatech.com>
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b3eec79b
...@@ -350,7 +350,9 @@ unsigned int sk_run_filter(const struct sk_buff *skb, ...@@ -350,7 +350,9 @@ unsigned int sk_run_filter(const struct sk_buff *skb,
continue; continue;
} }
default: 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; return 0;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment