From: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
To: netfilter-devel@vger.kernel.org
Cc: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Subject: [iptables-nftables PATCH] lixtables: Fixes option issues in libxt_mangle.c
Date: Thu, 3 Oct 2013 14:28:05 +0300 [thread overview]
Message-ID: <1380799685-11091-1-git-send-email-tomasz.bursztyka@linux.intel.com> (raw)
- use proper option IDs
- remove irrelevant flags on setting options mandatory
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
---
extensions/libxt_mangle.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/extensions/libxt_mangle.c b/extensions/libxt_mangle.c
index 822033c..4b20feb 100644
--- a/extensions/libxt_mangle.c
+++ b/extensions/libxt_mangle.c
@@ -33,22 +33,21 @@ static void mangle_help(void)
);
}
-#define MANGLE_IPS '1'
-#define MANGLE_IPT '2'
-#define MANGLE_DEVS '3'
-#define MANGLE_DEVT '4'
-#define MANGLE_TARGET '5'
+enum {
+ MANGLE_IPS = 0,
+ MANGLE_IPT = 1,
+ MANGLE_DEVS = 2,
+ MANGLE_DEVT = 3,
+ MANGLE_TARGET = 4,
+};
+
static const struct xt_option_entry mangle_opts[] = {
- { .name = "mangle-ip-s", .id = MANGLE_IPS, .type = XTTYPE_STRING,
- .flags = XTOPT_MAND },
- { .name = "mangle-ip-d", .id = MANGLE_IPT, .type = XTTYPE_STRING,
- .flags = XTOPT_MAND },
- { .name = "mangle-mac-s", .id = MANGLE_DEVS, .type = XTTYPE_STRING,
- .flags = XTOPT_MAND },
- { .name = "mangle-mac-d", .id = MANGLE_DEVT, .type = XTTYPE_STRING,
- .flags = XTOPT_MAND },
- { .name = "mangle-target", .id = MANGLE_TARGET, .type = XTTYPE_STRING,
- .flags = XTOPT_MAND },
+ { .name = "mangle-ip-s", .id = MANGLE_IPS, .type = XTTYPE_STRING },
+ { .name = "mangle-ip-d", .id = MANGLE_IPT, .type = XTTYPE_STRING },
+ { .name = "mangle-mac-s", .id = MANGLE_DEVS, .type = XTTYPE_STRING },
+ { .name = "mangle-mac-d", .id = MANGLE_DEVT, .type = XTTYPE_STRING },
+ { .name = "mangle-target", .id = MANGLE_TARGET,
+ .type = XTTYPE_STRING },
XTOPT_TABLEEND,
};
--
1.8.3.2
next reply other threads:[~2013-10-03 11:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-03 11:28 Tomasz Bursztyka [this message]
2013-10-03 13:00 ` [iptables-nftables PATCH] lixtables: Fixes option issues in libxt_mangle.c 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=1380799685-11091-1-git-send-email-tomasz.bursztyka@linux.intel.com \
--to=tomasz.bursztyka@linux.intel.com \
--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).