On Sat, 2006-08-07 at 10:14 -0400, Jamal Hadi Salim wrote:
> I have a dated patch to mirred (may not apply cleanly)
Sorry forgot to attach the patch. Attached for real this time;->
> that i believe
> will fix this specific one. Try to see if it also fixes this case you
> have.
I meant i know this works for eth0->eth0 i am not sure if it will fix
your specific case. I need my laptop at the moment ;->
If it does it will be an ok solution but not the best (because it
introduces an unnecessary check for the common case).
cheers,
jamal
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 4fcccbd..d8946b3 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -208,6 +208,12 @@ bad_mirred:
skb2->dev = dev;
skb2->input_dev = skb->dev;
+ if (skb2->input_dev == skb2->dev) {
+ if (net_ratelimit())
+ printk(" Mirred: Loop detected to %s\n",skb2->dev->name);
+ goto bad_mirred;
+ }
+
dev_queue_xmit(skb2);
spin_unlock(&p->lock);
return p->action;