aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/cls_api.c')
-rw-r--r--net/sched/cls_api.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 45527e6b52db..c28b0d327b12 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -561,13 +561,14 @@ EXPORT_SYMBOL(tcf_exts_change);
561int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts) 561int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts)
562{ 562{
563#ifdef CONFIG_NET_CLS_ACT 563#ifdef CONFIG_NET_CLS_ACT
564 struct nlattr *nest;
565
564 if (exts->action && !list_empty(&exts->actions)) { 566 if (exts->action && !list_empty(&exts->actions)) {
565 /* 567 /*
566 * again for backward compatible mode - we want 568 * again for backward compatible mode - we want
567 * to work with both old and new modes of entering 569 * to work with both old and new modes of entering
568 * tc data even if iproute2 was newer - jhs 570 * tc data even if iproute2 was newer - jhs
569 */ 571 */
570 struct nlattr *nest;
571 if (exts->type != TCA_OLD_COMPAT) { 572 if (exts->type != TCA_OLD_COMPAT) {
572 nest = nla_nest_start(skb, exts->action); 573 nest = nla_nest_start(skb, exts->action);
573 if (nest == NULL) 574 if (nest == NULL)
@@ -585,10 +586,14 @@ int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts)
585 nla_nest_end(skb, nest); 586 nla_nest_end(skb, nest);
586 } 587 }
587 } 588 }
588#endif
589 return 0; 589 return 0;
590nla_put_failure: __attribute__ ((unused)) 590
591nla_put_failure:
592 nla_nest_cancel(skb, nest);
591 return -1; 593 return -1;
594#else
595 return 0;
596#endif
592} 597}
593EXPORT_SYMBOL(tcf_exts_dump); 598EXPORT_SYMBOL(tcf_exts_dump);
594 599