Skip to content

Commit

Permalink
net: filter: Use WARN_RATELIMIT
Browse files Browse the repository at this point in the history
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: Ben Greear <[email protected]>
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
JoePerches authored and davem330 committed May 23, 2011
1 parent b3eec79 commit 6c4a5cb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/core/filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 6c4a5cb

Please sign in to comment.