[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44.0611301309550.14993-100000@dhcp09282.ntc.nokia.com>
Date: Thu, 30 Nov 2006 14:06:01 +0200 (EET)
From: "Nordlund Kim (Nokia-NET/Helsinki)" <Kim.Nordlund@...ia.com>
To: davem@...emloft.net
cc: netdev@...r.kernel.org
Subject: [PKT_SCHED] act_gact: division by zero
tc qdisc add dev eth1 handle ffff: ingress
tc filter add dev eth1 protocol ip parent ffff: pref 99 basic \
flowid 1:1 action pass random determ drop 0
^
the above cause a division by zero in the kernel on the first
packet in.
Signed-off-by: Kim Nordlund <kim.nordlund@...ia.com>
diff -rub linux-2.6.19-orig/net/sched/act_gact.c linux/net/sched/act_gact.c
--- linux-2.6.19-orig/net/sched/act_gact.c 2006-11-29 23:57:37.000000000 +0200
+++ linux/net/sched/act_gact.c 2006-11-30 13:22:37.000000000 +0200
@@ -111,7 +111,7 @@
if (tb[TCA_GACT_PROB-1] != NULL) {
struct tc_gact_p *p_parm = RTA_DATA(tb[TCA_GACT_PROB-1]);
gact->tcfg_paction = p_parm->paction;
- gact->tcfg_pval = p_parm->pval;
+ gact->tcfg_pval = p_parm->pval ? : 1;
gact->tcfg_ptype = p_parm->ptype;
}
#endif
-
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