netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@inai.de>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 09/13] iptables: fix order of internal commands list
Date: Wed, 26 Dec 2012 00:11:25 +0100	[thread overview]
Message-ID: <1356477089-13241-10-git-send-email-jengelh@inai.de> (raw)
In-Reply-To: <1356477089-13241-1-git-send-email-jengelh@inai.de>

Specifying -S on the command line would add 4096 (0x1000, 1<<12) to the
cmd flags, but -S was in fact commands_v_options[13]. This led to a
bogus option checking and an error message:

$ iptables -A foo -S
iptables v1.4.14: Cannot use -E with -A

References: http://bugs.debian.org/642173
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
 iptables/ip6tables.c |   12 ++++++------
 iptables/iptables.c  |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/iptables/ip6tables.c b/iptables/ip6tables.c
index 0e11a9e..7f14dde 100644
--- a/iptables/ip6tables.c
+++ b/iptables/ip6tables.c
@@ -76,12 +76,12 @@
 #define CMD_LIST		0x0020U
 #define CMD_FLUSH		0x0040U
 #define CMD_ZERO		0x0080U
-#define CMD_NEW_CHAIN		0x0100U
-#define CMD_DELETE_CHAIN	0x0200U
-#define CMD_SET_POLICY		0x0400U
-#define CMD_RENAME_CHAIN	0x0800U
-#define CMD_LIST_RULES		0x1000U
-#define CMD_ZERO_NUM		0x2000U
+#define CMD_ZERO_NUM		0x0100U
+#define CMD_NEW_CHAIN		0x0200U
+#define CMD_DELETE_CHAIN	0x0400U
+#define CMD_SET_POLICY		0x0800U
+#define CMD_RENAME_CHAIN	0x1000U
+#define CMD_LIST_RULES		0x2000U
 #define CMD_CHECK		0x4000U
 #define NUMBER_OF_CMD	16
 static const char cmdflags[] = { 'I', 'D', 'D', 'R', 'A', 'L', 'F', 'Z',
diff --git a/iptables/iptables.c b/iptables/iptables.c
index f765cf9..10a0417 100644
--- a/iptables/iptables.c
+++ b/iptables/iptables.c
@@ -72,12 +72,12 @@
 #define CMD_LIST		0x0020U
 #define CMD_FLUSH		0x0040U
 #define CMD_ZERO		0x0080U
-#define CMD_NEW_CHAIN		0x0100U
-#define CMD_DELETE_CHAIN	0x0200U
-#define CMD_SET_POLICY		0x0400U
-#define CMD_RENAME_CHAIN	0x0800U
-#define CMD_LIST_RULES		0x1000U
-#define CMD_ZERO_NUM		0x2000U
+#define CMD_ZERO_NUM		0x0100U
+#define CMD_NEW_CHAIN		0x0200U
+#define CMD_DELETE_CHAIN	0x0400U
+#define CMD_SET_POLICY		0x0800U
+#define CMD_RENAME_CHAIN	0x1000U
+#define CMD_LIST_RULES		0x2000U
 #define CMD_CHECK		0x4000U
 #define NUMBER_OF_CMD	16
 static const char cmdflags[] = { 'I', 'D', 'D', 'R', 'A', 'L', 'F', 'Z',
-- 
1.7.10.4


  parent reply	other threads:[~2012-12-25 23:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-25 23:11 Documentation and a build fix Jan Engelhardt
2012-12-25 23:11 ` [PATCH 01/13] doc: add package version to all manpages Jan Engelhardt
2012-12-26 14:33   ` Pablo Neira Ayuso
2012-12-26 14:34     ` Pablo Neira Ayuso
2012-12-25 23:11 ` [PATCH 02/13] doc: fixup omissions in ip6tables-restore.8 Jan Engelhardt
2012-12-25 23:11 ` [PATCH 03/13] doc: document iptables-restore's -t option Jan Engelhardt
2012-12-25 23:11 ` [PATCH 04/13] doc: document iptables-restore's -v option Jan Engelhardt
2012-12-25 23:11 ` [PATCH 05/13] doc: document iptables-restore's -M option Jan Engelhardt
2012-12-25 23:11 ` [PATCH 06/13] doc: document iptables-restore's -h option Jan Engelhardt
2012-12-25 23:11 ` [PATCH 07/13] doc: name the supported log levels for ipt_LOG Jan Engelhardt
2012-12-25 23:11 ` [PATCH 08/13] src: remove faulty deprecated marker in libipt_LOG source Jan Engelhardt
2012-12-25 23:11 ` Jan Engelhardt [this message]
2012-12-26 14:27   ` [PATCH 09/13] iptables: fix order of internal commands list Pablo Neira Ayuso
2012-12-25 23:11 ` [PATCH 10/13] iptables: implement --line-numbers for iptables -S Jan Engelhardt
2012-12-25 23:11 ` [PATCH 11/13] doc: mention -m in the manpage Jan Engelhardt
2012-12-25 23:11 ` [PATCH 12/13] doc: document the -4 and -6 options Jan Engelhardt
2012-12-26  8:21   ` Maciej Żenczykowski
2012-12-25 23:11 ` [PATCH 13/13] build: resolve link failure for ip6t_NETMAP Jan Engelhardt
2013-01-07  1:52 ` Documentation and a build fix 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=1356477089-13241-10-git-send-email-jengelh@inai.de \
    --to=jengelh@inai.de \
    --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 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).