diff options
Diffstat (limited to 'net/sched/sch_dsmark.c')
-rw-r--r-- | net/sched/sch_dsmark.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/net/sched/sch_dsmark.c b/net/sched/sch_dsmark.c index 2c790204d042..3886365cc207 100644 --- a/net/sched/sch_dsmark.c +++ b/net/sched/sch_dsmark.c | |||
@@ -265,8 +265,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
265 | return NET_XMIT_SUCCESS; | 265 | return NET_XMIT_SUCCESS; |
266 | 266 | ||
267 | drop: | 267 | drop: |
268 | kfree_skb(skb); | 268 | qdisc_drop(skb, sch); |
269 | sch->qstats.drops++; | ||
270 | return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS; | 269 | return NET_XMIT_SUCCESS | __NET_XMIT_BYPASS; |
271 | } | 270 | } |
272 | 271 | ||
@@ -429,8 +428,9 @@ static int dsmark_dump_class(struct Qdisc *sch, unsigned long cl, | |||
429 | opts = nla_nest_start(skb, TCA_OPTIONS); | 428 | opts = nla_nest_start(skb, TCA_OPTIONS); |
430 | if (opts == NULL) | 429 | if (opts == NULL) |
431 | goto nla_put_failure; | 430 | goto nla_put_failure; |
432 | NLA_PUT_U8(skb, TCA_DSMARK_MASK, p->mask[cl - 1]); | 431 | if (nla_put_u8(skb, TCA_DSMARK_MASK, p->mask[cl - 1]) || |
433 | NLA_PUT_U8(skb, TCA_DSMARK_VALUE, p->value[cl - 1]); | 432 | nla_put_u8(skb, TCA_DSMARK_VALUE, p->value[cl - 1])) |
433 | goto nla_put_failure; | ||
434 | 434 | ||
435 | return nla_nest_end(skb, opts); | 435 | return nla_nest_end(skb, opts); |
436 | 436 | ||
@@ -447,13 +447,16 @@ static int dsmark_dump(struct Qdisc *sch, struct sk_buff *skb) | |||
447 | opts = nla_nest_start(skb, TCA_OPTIONS); | 447 | opts = nla_nest_start(skb, TCA_OPTIONS); |
448 | if (opts == NULL) | 448 | if (opts == NULL) |
449 | goto nla_put_failure; | 449 | goto nla_put_failure; |
450 | NLA_PUT_U16(skb, TCA_DSMARK_INDICES, p->indices); | 450 | if (nla_put_u16(skb, TCA_DSMARK_INDICES, p->indices)) |
451 | goto nla_put_failure; | ||
451 | 452 | ||
452 | if (p->default_index != NO_DEFAULT_INDEX) | 453 | if (p->default_index != NO_DEFAULT_INDEX && |
453 | NLA_PUT_U16(skb, TCA_DSMARK_DEFAULT_INDEX, p->default_index); | 454 | nla_put_u16(skb, TCA_DSMARK_DEFAULT_INDEX, p->default_index)) |
455 | goto nla_put_failure; | ||
454 | 456 | ||
455 | if (p->set_tc_index) | 457 | if (p->set_tc_index && |
456 | NLA_PUT_FLAG(skb, TCA_DSMARK_SET_TC_INDEX); | 458 | nla_put_flag(skb, TCA_DSMARK_SET_TC_INDEX)) |
459 | goto nla_put_failure; | ||
457 | 460 | ||
458 | return nla_nest_end(skb, opts); | 461 | return nla_nest_end(skb, opts); |
459 | 462 | ||