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

Commit de384830 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller
Browse files

net: ingress filter message limit



If user misconfigures ingress and causes a redirection loop, don't
overwhelm the log.  This is also a error case so make it unlikely.
Found by inspection, luckily not in real system.

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2e0c7c9
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2646,9 +2646,9 @@ static int ing_filter(struct sk_buff *skb)
	int result = TC_ACT_OK;
	struct Qdisc *q;

	if (MAX_RED_LOOP < ttl++) {
		printk(KERN_WARNING
		       "Redir loop detected Dropping packet (%d->%d)\n",
	if (unlikely(MAX_RED_LOOP < ttl++)) {
		if (net_ratelimit())
			pr_warning( "Redir loop detected Dropping packet (%d->%d)\n",
			       skb->skb_iif, dev->ifindex);
		return TC_ACT_SHOT;
	}