summaryrefslogtreecommitdiffstats
path: root/net/core/filter.c
diff options
context:
space:
mode:
authorJoe Perches2011-05-21 09:48:40 +0200
committerDavid S. Miller2011-05-23 23:37:43 +0200
commit6c4a5cb219520c7bc937ee186ca53f03733bd09f (patch)
treed7975f40b55a2aecdf30723ed78bcfa43b415e06 /net/core/filter.c
parentbug.h: Add WARN_RATELIMIT (diff)
downloadkernel-qcow2-linux-6c4a5cb219520c7bc937ee186ca53f03733bd09f.tar.gz
kernel-qcow2-linux-6c4a5cb219520c7bc937ee186ca53f03733bd09f.tar.xz
kernel-qcow2-linux-6c4a5cb219520c7bc937ee186ca53f03733bd09f.zip
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: Ben Greear <greearb@candelatech.com> Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/filter.c')
-rw-r--r--net/core/filter.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 0eb8c4466eaa..0e3622f1dcb1 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -350,7 +350,9 @@ load_b:
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;
}
}