summaryrefslogtreecommitdiff
path: root/net/sched/cls_u32.c
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2016-04-26 08:06:18 (GMT)
committerDavid S. Miller <davem@davemloft.net>2016-04-26 16:00:49 (GMT)
commit9854518ea04db33738602d45ebc96a200e6f5198 (patch)
tree96d3d6f4024f7a79010bea763f5922315d7bd63f /net/sched/cls_u32.c
parentb676338fb3aab0b63b4a2489feb8f35003db22e8 (diff)
downloadlinux-9854518ea04db33738602d45ebc96a200e6f5198.tar.xz
sched: align nlattr properly when needed
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_u32.c')
-rw-r--r--net/sched/cls_u32.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 563cdad..e64877a 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -1140,9 +1140,10 @@ static int u32_dump(struct net *net, struct tcf_proto *tp, unsigned long fh,
gpf->kcnts[i] += pf->kcnts[i];
}
- if (nla_put(skb, TCA_U32_PCNT,
- sizeof(struct tc_u32_pcnt) + n->sel.nkeys*sizeof(u64),
- gpf)) {
+ if (nla_put_64bit(skb, TCA_U32_PCNT,
+ sizeof(struct tc_u32_pcnt) +
+ n->sel.nkeys * sizeof(u64),
+ gpf, TCA_U32_PAD)) {
kfree(gpf);
goto nla_put_failure;
}