diff options
Diffstat (limited to 'net/sched/cls_route.c')
-rw-r--r-- | net/sched/cls_route.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/net/sched/cls_route.c b/net/sched/cls_route.c index 13ab66e9df58..36fec4227401 100644 --- a/net/sched/cls_route.c +++ b/net/sched/cls_route.c | |||
@@ -571,17 +571,21 @@ static int route4_dump(struct tcf_proto *tp, unsigned long fh, | |||
571 | 571 | ||
572 | if (!(f->handle & 0x8000)) { | 572 | if (!(f->handle & 0x8000)) { |
573 | id = f->id & 0xFF; | 573 | id = f->id & 0xFF; |
574 | NLA_PUT_U32(skb, TCA_ROUTE4_TO, id); | 574 | if (nla_put_u32(skb, TCA_ROUTE4_TO, id)) |
575 | goto nla_put_failure; | ||
575 | } | 576 | } |
576 | if (f->handle & 0x80000000) { | 577 | if (f->handle & 0x80000000) { |
577 | if ((f->handle >> 16) != 0xFFFF) | 578 | if ((f->handle >> 16) != 0xFFFF && |
578 | NLA_PUT_U32(skb, TCA_ROUTE4_IIF, f->iif); | 579 | nla_put_u32(skb, TCA_ROUTE4_IIF, f->iif)) |
580 | goto nla_put_failure; | ||
579 | } else { | 581 | } else { |
580 | id = f->id >> 16; | 582 | id = f->id >> 16; |
581 | NLA_PUT_U32(skb, TCA_ROUTE4_FROM, id); | 583 | if (nla_put_u32(skb, TCA_ROUTE4_FROM, id)) |
584 | goto nla_put_failure; | ||
582 | } | 585 | } |
583 | if (f->res.classid) | 586 | if (f->res.classid && |
584 | NLA_PUT_U32(skb, TCA_ROUTE4_CLASSID, f->res.classid); | 587 | nla_put_u32(skb, TCA_ROUTE4_CLASSID, f->res.classid)) |
588 | goto nla_put_failure; | ||
585 | 589 | ||
586 | if (tcf_exts_dump(skb, &f->exts, &route_ext_map) < 0) | 590 | if (tcf_exts_dump(skb, &f->exts, &route_ext_map) < 0) |
587 | goto nla_put_failure; | 591 | goto nla_put_failure; |