[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1305657014-32736-1-git-send-email-greearb@candelatech.com>
Date: Tue, 17 May 2011 11:30:14 -0700
From: greearb@...delatech.com
To: netdev@...r.kernel.org
Cc: Ben Greear <greearb@...delatech.com>
Subject: [PATCH] sk-filter: Rate-limit WARNing, print dbg info.
From: Ben Greear <greearb@...delatech.com>
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.
Signed-off-by: Ben Greear <greearb@...delatech.com>
---
:100644 100644 afc5837... 8249745... M net/core/filter.c
net/core/filter.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/net/core/filter.c b/net/core/filter.c
index afc5837..8249745 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -409,7 +409,13 @@ load_b:
continue;
}
default:
- WARN_ON(1);
+ if (net_ratelimit()) {
+ pr_err("filter: Unknown code: %hu jt: %u tf: %u"
+ " k: %u\n",
+ fentry->code, (unsigned int)(fentry->jt),
+ (unsigned int)(fentry->jf), fentry->k);
+ WARN_ON(1);
+ }
return 0;
}
}
--
1.7.3.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists