diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-23 23:34:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:11:20 -0500 |
commit | 24beeab539c6f42c4a93e2ff7c3b5f272e60da45 (patch) | |
tree | eb1be7e7d8b3f0f3375bf0d12fd26851e518d9ca /net/sched/cls_tcindex.c | |
parent | 57e1c487a4f5754cb77abeb00adb21faa88c484f (diff) |
[NET_SCHED]: Use typeful attribute construction helpers
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/cls_tcindex.c')
-rw-r--r-- | net/sched/cls_tcindex.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/sched/cls_tcindex.c b/net/sched/cls_tcindex.c index cd350d38bdaf..7d46df7eac09 100644 --- a/net/sched/cls_tcindex.c +++ b/net/sched/cls_tcindex.c | |||
@@ -449,11 +449,10 @@ static int tcindex_dump(struct tcf_proto *tp, unsigned long fh, | |||
449 | 449 | ||
450 | if (!fh) { | 450 | if (!fh) { |
451 | t->tcm_handle = ~0; /* whatever ... */ | 451 | t->tcm_handle = ~0; /* whatever ... */ |
452 | NLA_PUT(skb, TCA_TCINDEX_HASH, sizeof(p->hash), &p->hash); | 452 | NLA_PUT_U32(skb, TCA_TCINDEX_HASH, p->hash); |
453 | NLA_PUT(skb, TCA_TCINDEX_MASK, sizeof(p->mask), &p->mask); | 453 | NLA_PUT_U16(skb, TCA_TCINDEX_MASK, p->mask); |
454 | NLA_PUT(skb, TCA_TCINDEX_SHIFT, sizeof(p->shift), &p->shift); | 454 | NLA_PUT_U32(skb, TCA_TCINDEX_SHIFT, p->shift); |
455 | NLA_PUT(skb, TCA_TCINDEX_FALL_THROUGH, sizeof(p->fall_through), | 455 | NLA_PUT_U32(skb, TCA_TCINDEX_FALL_THROUGH, p->fall_through); |
456 | &p->fall_through); | ||
457 | nla_nest_end(skb, nest); | 456 | nla_nest_end(skb, nest); |
458 | } else { | 457 | } else { |
459 | if (p->perfect) { | 458 | if (p->perfect) { |
@@ -473,7 +472,7 @@ static int tcindex_dump(struct tcf_proto *tp, unsigned long fh, | |||
473 | } | 472 | } |
474 | pr_debug("handle = %d\n", t->tcm_handle); | 473 | pr_debug("handle = %d\n", t->tcm_handle); |
475 | if (r->res.class) | 474 | if (r->res.class) |
476 | NLA_PUT(skb, TCA_TCINDEX_CLASSID, 4, &r->res.classid); | 475 | NLA_PUT_U32(skb, TCA_TCINDEX_CLASSID, r->res.classid); |
477 | 476 | ||
478 | if (tcf_exts_dump(skb, &r->exts, &tcindex_ext_map) < 0) | 477 | if (tcf_exts_dump(skb, &r->exts, &tcindex_ext_map) < 0) |
479 | goto nla_put_failure; | 478 | goto nla_put_failure; |