netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: "Carlos Falgueras García" <carlosfg@riseup.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 2/4 V6 nft] Implement deleting rule by description
Date: Mon, 22 Aug 2016 18:13:29 +0200	[thread overview]
Message-ID: <20160822161329.GB5023@salvia> (raw)
In-Reply-To: <20160821212210.26161-2-carlosfg@riseup.net>

On Sun, Aug 21, 2016 at 11:22:08PM +0200, Carlos Falgueras García wrote:
> This patch introduces deletion in a similar fashion as in iptables, thus,
> we can delete the first rule that matches our description, for example:
> 
> 	$ nft list -a ruleset
> 	table ip t {
> 		chain c {
> 			ip saddr 1.1.1.1 counter packets 0 bytes 0 # handle 1
> 			ip saddr 1.1.1.2 counter packets 0 bytes 0 # handle 2
> 			ip saddr 1.1.1.2 counter packets 0 bytes 0 # handle 3
> 			ip saddr 1.1.1.4 counter packets 0 bytes 0 # handle 4
> 		}
> 	}
> 	$ nft delete rule table chain ip saddr 1.1.1.2 counter
> 	$ nft list -a ruleset
> 	table ip t {
> 		chain c {
> 			ip saddr 1.1.1.1 counter packets 0 bytes 0 # handle 1
> 			ip saddr 1.1.1.2 counter packets 0 bytes 0 # handle 3
> 			ip saddr 1.1.1.4 counter packets 0 bytes 0 # handle 4
> 		}
> 	}
> 
> The parser rule 'ruleid_spec' is now of the type 'struct rule' in order to
> hold a rule description. When rule is identified with its handle a dummy
> 'struct rule' is allocated to hold the specified handle.

Applied, thanks Carlos.

  reply	other threads:[~2016-08-22 16:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-21 21:22 [PATCH 1/4 V6 nft] Simplify parser rule_spec tree Carlos Falgueras García
2016-08-21 21:22 ` [PATCH 2/4 V6 nft] Implement deleting rule by description Carlos Falgueras García
2016-08-22 16:13   ` Pablo Neira Ayuso [this message]
2016-08-21 21:22 ` [PATCH 3/4 V6 nft] test: shell: Add tests for " Carlos Falgueras García
2016-08-22 16:13   ` Pablo Neira Ayuso
     [not found]   ` <20160822162050.GA9973@salvia>
2016-08-22 16:21     ` Pablo Neira Ayuso
2016-08-22 16:27       ` Pablo Neira Ayuso
2016-08-21 21:22 ` [PATCH 4/4 V6 nft] parser: Improve syntax errors Carlos Falgueras García
2016-08-22 16:13 ` [PATCH 1/4 V6 nft] Simplify parser rule_spec tree Pablo Neira Ayuso

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=20160822161329.GB5023@salvia \
    --to=pablo@netfilter.org \
    --cc=carlosfg@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).