Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c4a5cb2 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller
Browse files

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;
		}
	}