]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
net sched actions: skbedit convert to use more modern nla_put_xxx
authorJamal Hadi Salim <jhs@mojatatu.com>
Sat, 2 Jul 2016 10:43:16 +0000 (06:43 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Jul 2016 22:11:14 +0000 (15:11 -0700)
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/act_skbedit.c

index 1c4c9240a3f8c330ec67cf8bc0940b3e6a3b4e9f..8e573c0f874237b86a2c1407c62f6ee5c05c275c 100644 (file)
@@ -170,20 +170,16 @@ static int tcf_skbedit_dump(struct sk_buff *skb, struct tc_action *a,
        if (nla_put(skb, TCA_SKBEDIT_PARMS, sizeof(opt), &opt))
                goto nla_put_failure;
        if ((d->flags & SKBEDIT_F_PRIORITY) &&
-           nla_put(skb, TCA_SKBEDIT_PRIORITY, sizeof(d->priority),
-                   &d->priority))
+           nla_put_u32(skb, TCA_SKBEDIT_PRIORITY, d->priority))
                goto nla_put_failure;
        if ((d->flags & SKBEDIT_F_QUEUE_MAPPING) &&
-           nla_put(skb, TCA_SKBEDIT_QUEUE_MAPPING,
-                   sizeof(d->queue_mapping), &d->queue_mapping))
+           nla_put_u16(skb, TCA_SKBEDIT_QUEUE_MAPPING, d->queue_mapping))
                goto nla_put_failure;
        if ((d->flags & SKBEDIT_F_MARK) &&
-           nla_put(skb, TCA_SKBEDIT_MARK, sizeof(d->mark),
-                   &d->mark))
+           nla_put_u32(skb, TCA_SKBEDIT_MARK, d->mark))
                goto nla_put_failure;
        if ((d->flags & SKBEDIT_F_PTYPE) &&
-           nla_put(skb, TCA_SKBEDIT_PTYPE, sizeof(d->ptype),
-                   &d->ptype))
+           nla_put_u16(skb, TCA_SKBEDIT_PTYPE, d->ptype))
                goto nla_put_failure;
 
        tcf_tm_dump(&t, &d->tcf_tm);