Blob Blame History Raw
From: Jiri Pirko <jiri@mellanox.com>
Date: Fri, 4 Aug 2017 14:29:03 +0200
Subject: net: sched: use tcf_exts_has_actions instead of exts->nr_actions
Patch-mainline: v4.14-rc1
Git-commit: 978dfd8d14a503d20be1f1e2ae328c3eac675a2d
References: bsc#1109837

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>
Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 net/sched/cls_api.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -923,7 +923,7 @@ int tcf_exts_dump(struct sk_buff *skb, s
 #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