vserver 2.0 rc7
[linux-2.6.git] / net / sched / act_api.c
index eebef4e..914c85f 100644 (file)
@@ -171,10 +171,10 @@ repeat:
                                skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd);
                                skb->tc_verd = CLR_TC_MUNGED(skb->tc_verd);
                        }
-                       if (ret != TC_ACT_PIPE)
-                               goto exec_done;
                        if (ret == TC_ACT_REPEAT)
                                goto repeat;    /* we need a ttl - JHS */
+                       if (ret != TC_ACT_PIPE)
+                               goto exec_done;
                }
                act = a->next;
        }
@@ -228,7 +228,7 @@ tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
                return err;
 
        RTA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind);
-       if (tcf_action_copy_stats(skb, a))
+       if (tcf_action_copy_stats(skb, a, 0))
                goto rtattr_failure;
        r = (struct rtattr*) skb->tail;
        RTA_PUT(skb, TCA_OPTIONS, 0, NULL);
@@ -380,19 +380,26 @@ err:
        return NULL;
 }
 
-int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a)
+int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
+                         int compat_mode)
 {
-       int err;
+       int err = 0;
        struct gnet_dump d;
        struct tcf_act_hdr *h = a->priv;
        
        if (h == NULL)
                goto errout;
 
-       if (a->type == TCA_OLD_COMPAT)
-               err = gnet_stats_start_copy_compat(skb, TCA_ACT_STATS,
-                       TCA_STATS, TCA_XSTATS, h->stats_lock, &d);
-       else
+       /* compat_mode being true specifies a call that is supposed
+        * to add additional backward compatiblity statistic TLVs.
+        */
+       if (compat_mode) {
+               if (a->type == TCA_OLD_COMPAT)
+                       err = gnet_stats_start_copy_compat(skb, 0,
+                               TCA_STATS, TCA_XSTATS, h->stats_lock, &d);
+               else
+                       return 0;
+       } else
                err = gnet_stats_start_copy(skb, TCA_ACT_STATS,
                        h->stats_lock, &d);
 
@@ -874,7 +881,7 @@ static int __init tc_action_init(void)
                link_p[RTM_GETACTION-RTM_BASE].dumpit = tc_dump_action;
        }
 
-       printk("TC classifier action (bugs to netdev@oss.sgi.com cc "
+       printk("TC classifier action (bugs to netdev@vger.kernel.org cc "
               "hadi@cyberus.ca)\n");
        return 0;
 }