|
@@ -1389,6 +1389,13 @@ static int tc_del_tfilter(struct sk_buff *skb, struct nlmsghdr *n,
|
|
|
}
|
|
}
|
|
|
chain = tcf_chain_get(block, chain_index, false);
|
|
chain = tcf_chain_get(block, chain_index, false);
|
|
|
if (!chain) {
|
|
if (!chain) {
|
|
|
|
|
+ /* User requested flush on non-existent chain. Nothing to do,
|
|
|
|
|
+ * so just return success.
|
|
|
|
|
+ */
|
|
|
|
|
+ if (prio == 0) {
|
|
|
|
|
+ err = 0;
|
|
|
|
|
+ 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 = -EINVAL;
|
|
|
goto errout;
|
|
goto errout;
|