ChangeSet 1.2199.14.42, 2005/03/25 09:34:52-08:00, [EMAIL PROTECTED]
[PKT_SCHED]: action stats double dip
Following patch fixes a scenario where we have forward compatibility
but action stats being double dipped.
Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
cls_fw.c | 5 +++--
cls_route.c | 5 +++--
cls_tcindex.c | 5 +++--
cls_u32.c | 2 +-
4 files changed, 10 insertions(+), 7 deletions(-)
diff -Nru a/net/sched/cls_fw.c b/net/sched/cls_fw.c
--- a/net/sched/cls_fw.c 2005-03-26 17:26:51 -08:00
+++ b/net/sched/cls_fw.c 2005-03-26 17:26:51 -08:00
@@ -338,8 +338,9 @@
rta->rta_len = skb->tail - b;
- if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0)
- goto rtattr_failure;
+ if (f->exts.action && f->exts.action->type == TCA_OLD_COMPAT)
+ if (tcf_exts_dump_stats(skb, &f->exts, &fw_ext_map) < 0)
+ goto rtattr_failure;
return skb->len;
diff -Nru a/net/sched/cls_route.c b/net/sched/cls_route.c
--- a/net/sched/cls_route.c 2005-03-26 17:26:51 -08:00
+++ b/net/sched/cls_route.c 2005-03-26 17:26:51 -08:00
@@ -599,8 +599,9 @@
rta->rta_len = skb->tail - b;
- if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0)
- goto rtattr_failure;
+ if (f->exts.action && f->exts.action->type == TCA_OLD_COMPAT)
+ if (tcf_exts_dump_stats(skb, &f->exts, &route_ext_map) < 0)
+ goto rtattr_failure;
return skb->len;
diff -Nru a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c
--- a/net/sched/cls_tcindex.c 2005-03-26 17:26:51 -08:00
+++ b/net/sched/cls_tcindex.c 2005-03-26 17:26:51 -08:00
@@ -496,8 +496,9 @@
goto rtattr_failure;
rta->rta_len = skb->tail-b;
- if (tcf_exts_dump_stats(skb, &r->exts, &tcindex_ext_map) < 0)
- goto rtattr_failure;
+ if (r->exts.action && r->exts.action->type == TCA_OLD_COMPAT)
+ if (tcf_exts_dump_stats(skb, &r->exts,
&tcindex_ext_map) < 0)
+ goto rtattr_failure;
}
return skb->len;
diff -Nru a/net/sched/cls_u32.c b/net/sched/cls_u32.c
--- a/net/sched/cls_u32.c 2005-03-26 17:26:51 -08:00
+++ b/net/sched/cls_u32.c 2005-03-26 17:26:51 -08:00
@@ -775,7 +775,7 @@
}
rta->rta_len = skb->tail - b;
- if (TC_U32_KEY(n->handle))
+ if (TC_U32_KEY(n->handle) && n->exts.action && n->exts.action->type ==
TCA_OLD_COMPAT)
if (tcf_exts_dump_stats(skb, &n->exts, &u32_ext_map) < 0)
goto rtattr_failure;
return skb->len;
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html