Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}