浏览代码

net: sched: use tcf_exts_has_actions instead of exts->nr_actions

For check in tcf_exts_dump use tcf_exts_has_actions helper instead
of exts->nr_actions for checking if there are any actions present.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jiri Pirko 8 年之前
父节点
当前提交
978dfd8d14
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      net/sched/cls_api.c

+ 1 - 1
net/sched/cls_api.c

@@ -915,7 +915,7 @@ int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts)
 #ifdef CONFIG_NET_CLS_ACT
 	struct nlattr *nest;
 
-	if (exts->action && exts->nr_actions) {
+	if (exts->action && tcf_exts_has_actions(exts)) {
 		/*
 		 * again for backward compatible mode - we want
 		 * to work with both old and new modes of entering