diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index aad6a67..8e7ad61 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -602,9 +602,11 @@ EXPORT_SYMBOL(tcf_exts_dump); int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts) { #ifdef CONFIG_NET_CLS_ACT - struct tc_action *a = tcf_exts_first_act(exts); - if (tcf_action_copy_stats(skb, a, 1) < 0) - return -1; + if(tcf_exts_is_available(exts)) { + struct tc_action *a = tcf_exts_first_act(exts); + if (tcf_action_copy_stats(skb, a, 1) < 0) + return -1; + } #endif return 0; }