Commit b7b4247d authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: sched: return -ENOENT when trying to remove filter from non-existent chain

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.
Reported-by: default avatarRoman Mashak <mrv@mojatatu.com>
Fixes: f71e0ca4 ("net: sched: Avoid implicit chain 0 creation")
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d5ed72a5
...@@ -1399,7 +1399,7 @@ static int tc_del_tfilter(struct sk_buff *skb, struct nlmsghdr *n, ...@@ -1399,7 +1399,7 @@ static int tc_del_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
goto errout; goto errout;
} }
NL_SET_ERR_MSG(extack, "Cannot find specified filter chain"); NL_SET_ERR_MSG(extack, "Cannot find specified filter chain");
err = -EINVAL; err = -ENOENT;
goto errout; goto errout;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment