aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2010-08-01 03:33:23 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-01 03:33:23 -0400
commitde38483010bae523f533bb6bf9f7b7353772f6eb (patch)
treeee31326ffb81541496ca960a9fbfa8a92a13d26c /net/core/dev.c
parente2e0c7c9ddbe6b79fe647aca5eea3a405d38ada4 (diff)
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: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index b74fcd3e9365..5d1282df2fe3 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2646,10 +2646,10 @@ static int ing_filter(struct sk_buff *skb)
2646 int result = TC_ACT_OK; 2646 int result = TC_ACT_OK;
2647 struct Qdisc *q; 2647 struct Qdisc *q;
2648 2648
2649 if (MAX_RED_LOOP < ttl++) { 2649 if (unlikely(MAX_RED_LOOP < ttl++)) {
2650 printk(KERN_WARNING 2650 if (net_ratelimit())
2651 "Redir loop detected Dropping packet (%d->%d)\n", 2651 pr_warning( "Redir loop detected Dropping packet (%d->%d)\n",
2652 skb->skb_iif, dev->ifindex); 2652 skb->skb_iif, dev->ifindex);
2653 return TC_ACT_SHOT; 2653 return TC_ACT_SHOT;
2654 } 2654 }
2655 2655