All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: netfilter-devel@vger.kernel.org
Cc: pablo@netfilter.org
Subject: [PATCH] nftables: add 'delete map' syntax
Date: Sat, 30 Nov 2013 12:41:21 -0800	[thread overview]
Message-ID: <20131130204121.GA23143@home> (raw)

[-- Attachment #1: Type: text/plain, Size: 456 bytes --]

Creating a map is done via "add map".  However, to delete a map requires using
"delete set", which is confusing.  Add the appropriate synonym to parser.  
The downside to this is that one can now delete a set with "delete map", but
this seems a minor issue.  It could of course be fixed by adding a new
CMD_OBJ_MAP.

This closes netfilter bugzilla #879.

Reported-by: Bjørnar Ness <bjornar.ness@gmail.com>
Signed-off-by: Phil Oester <kernel@linuxace.com>


[-- Attachment #2: patch-nft-map_delete --]
[-- Type: text/plain, Size: 433 bytes --]

diff --git a/src/parser.y b/src/parser.y
index a49e5c2..c736240 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -604,6 +604,10 @@ delete_cmd		:	TABLE		table_spec
 			{
 				$$ = cmd_alloc(CMD_DELETE, CMD_OBJ_SET, &$2, &@$, NULL);
 			}
+			|	MAP		set_spec
+			{
+				$$ = cmd_alloc(CMD_DELETE, CMD_OBJ_SET, &$2, &@$, NULL);
+			}
 			|	ELEMENT		set_spec	set_expr
 			{
 				$$ = cmd_alloc(CMD_DELETE, CMD_OBJ_SETELEM, &$2, &@$, $3);

             reply	other threads:[~2013-11-30 20:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-30 20:41 Phil Oester [this message]
2013-11-30 20:54 ` [PATCH] nftables: add 'delete map' syntax 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=20131130204121.GA23143@home \
    --to=kernel@linuxace.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.