netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Fernando Fernandez Mancera <ffmancera@riseup.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft v6] src: add support to command "destroy"
Date: Mon, 6 Feb 2023 11:19:33 +0100	[thread overview]
Message-ID: <Y+DUNb50mi5KiHCS@salvia> (raw)
In-Reply-To: <20230102143822.632-1-ffmancera@riseup.net>

On Mon, Jan 02, 2023 at 03:38:22PM +0100, Fernando Fernandez Mancera wrote:
> "destroy" command performs a deletion as "delete" command but does not fail
> when the object does not exist. As there is no NLM_F_* flag for ignoring such
> error, it needs to be ignored directly on error handling.
> 
> Example of use:
> 
> 	# nft list ruleset
>         table ip filter {
>                 chain output {
>                 }
>         }
>         # nft destroy table ip missingtable
> 	# echo $?
> 	0
>         # nft list ruleset
>         table ip filter {
>                 chain output {
>                 }
>         }

Applied, thanks.

[...]
>  create mode 100755 tests/shell/testcases/rule_management/0011destroy_0
>  create mode 100755 tests/shell/testcases/rule_management/0012destroy_0
>  create mode 100644 tests/shell/testcases/rule_management/dumps/0011destroy_0.nft
>  create mode 100644 tests/shell/testcases/rule_management/dumps/0012destroy_0.nft

More tests for other objects would be good to have.

      reply	other threads:[~2023-02-06 10:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-02 14:38 [PATCH nft v6] src: add support to command "destroy" Fernando Fernandez Mancera
2023-02-06 10:19 ` Pablo Neira Ayuso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y+DUNb50mi5KiHCS@salvia \
    --to=pablo@netfilter.org \
    --cc=ffmancera@riseup.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).