net: sched: couple of small fixes
Subsystems (3)
Jiri Pirko
maintainercover net: sched: couple of small fixes
From: Jiri Pirko <[email protected]>
Jiri Pirko (2):
net: sched: fix extack error message when chain is failed to be
created
net: sched: return -ENOENT when trying to remove filter from
non-existent chain
net/sched/cls_api.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.14.4
Jiri Pirko
maintainerPATCH 1/2 net: sched: fix extack error message when chain is failed to be created
From: Jiri Pirko <[email protected]>
Instead "Cannot find" say "Cannot create".
--- net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/cls_api.c +1 -1
@@ -1252,7 +1252,7 @@ static int tc_new_tfilter(struct sk_buff *skb, struct nlmsghdr *n, } chain =tcf_chain_get (block, chain_index, true);if (!chain) { -NL_SET_ERR_MSG (extack,"Cannot find specified filter chain" ); +NL_SET_ERR_MSG (extack,"Cannot create specified filter chain" ); err = -ENOMEM ; goto errout; }
Signature · 1 line
2.14.4
Jiri Pirko
maintainerPATCH 2/2 net: sched: return -ENOENT when trying to remove filter from non-existent chain
In reply to Jiri PirkoFrom: Jiri Pirko <[email protected]>
When chain 0 was implicitly created, removal of non-existent filter from chain 0 gave -ENOENT. Once chain 0 became non-implicit, the same call is giving -EINVAL. Fix this by returning -ENOENT in that case.
--- net/sched/cls_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/cls_api.c +1 -1
@@ -1399,7 +1399,7 @@ static int tc_del_tfilter(struct sk_buff *skb, struct nlmsghdr *n, goto errout; }NL_SET_ERR_MSG (extack,"Cannot find specified filter chain" ); - err = -EINVAL ; + err = -ENOENT ; goto errout; }
Signature · 1 line
2.14.4
Quoted 8 lines · Jiri Pirko
From: Jiri Pirko <[email protected]>
Jiri Pirko (2):
net: sched: fix extack error message when chain is failed to be
created
net: sched: return-ENOENTwhen trying to remove filter from
non-existent chain
David Miller
maintainerFrom: Cong Wang <[email protected]>
Date: Mon, 27 Aug 2018 13:44:56 -0700
Quoted 11 lines · Jiri Pirko
Quoted 8 lines
From: Jiri Pirko <[email protected]>
Jiri Pirko (2):
net: sched: fix extack error message when chain is failed to be
created
net: sched: return-ENOENTwhen trying to remove filter from
non-existent chainAcked-by Cong Wang <[email protected]>
Series applied.