net sched actions: bug fix dumping actions directly didnt produce NLMSG_DONE
[deliverable/linux.git] / net / sched / act_api.c
index 96066665e3765d342fd1685ab32f0019c7455564..c7a0b0d481c08ab7533d273e57c1897c2760d1d0 100644 (file)
@@ -657,12 +657,15 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
        if (compat_mode) {
                if (a->type == TCA_OLD_COMPAT)
                        err = gnet_stats_start_copy_compat(skb, 0,
-                               TCA_STATS, TCA_XSTATS, &p->tcfc_lock, &d);
+                                                          TCA_STATS,
+                                                          TCA_XSTATS,
+                                                          &p->tcfc_lock, &d,
+                                                          TCA_PAD);
                else
                        return 0;
        } else
                err = gnet_stats_start_copy(skb, TCA_ACT_STATS,
-                                           &p->tcfc_lock, &d);
+                                           &p->tcfc_lock, &d, TCA_ACT_PAD);
 
        if (err < 0)
                goto errout;
@@ -1115,7 +1118,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
                nla_nest_end(skb, nest);
                ret = skb->len;
        } else
-               nla_nest_cancel(skb, nest);
+               nlmsg_trim(skb, b);
 
        nlh->nlmsg_len = skb_tail_pointer(skb) - b;
        if (NETLINK_CB(cb->skb).portid && ret)
This page took 0.02693 seconds and 5 git commands to generate.