From: Jiri Pirko Subject: [patch net-next] net: sched: unmark chain as explicitly created on delete Date: Thu, 26 Jul 2018 18:27:58 +0200 Message-ID: <20180726162758.14306-1-jiri@resnulli.us> Cc: davem@davemloft.net, jhs@mojatatu.com, xiyou.wangcong@gmail.com, mlxsw@mellanox.com To: netdev@vger.kernel.org Return-path: Received: from mail-wm0-f66.google.com ([74.125.82.66]:55986 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730610AbeGZRsC (ORCPT ); Thu, 26 Jul 2018 13:48:02 -0400 Received: by mail-wm0-f66.google.com with SMTP id f21-v6so2567629wmc.5 for ; Thu, 26 Jul 2018 09:30:27 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: From: Jiri Pirko Once user manually deletes the chain using "chain del", the chain cannot be marked as explicitly created anymore. Signed-off-by: Jiri Pirko Fixes: 32a4f5ecd738 ("net: sched: introduce chain object to uapi") --- net/sched/cls_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index f3d78c23338e..75cce2819de9 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -1844,6 +1844,7 @@ static int tc_ctl_chain(struct sk_buff *skb, struct nlmsghdr *n, * to the chain previously taken during addition. */ tcf_chain_put_explicitly_created(chain); + chain->explicitly_created = false; break; case RTM_GETCHAIN: err = tc_chain_notify(chain, skb, n->nlmsg_seq, -- 2.14.4