* [iptables-nftables PATCH] lixtables: Fixes option issues in libxt_mangle.c
@ 2013-10-03 11:28 Tomasz Bursztyka
2013-10-03 13:00 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Tomasz Bursztyka @ 2013-10-03 11:28 UTC (permalink / raw)
To: netfilter-devel; +Cc: Tomasz Bursztyka
- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [iptables-nftables PATCH] lixtables: Fixes option issues in libxt_mangle.c
2013-10-03 11:28 [iptables-nftables PATCH] lixtables: Fixes option issues in libxt_mangle.c Tomasz Bursztyka
@ 2013-10-03 13:00 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2013-10-03 13:00 UTC (permalink / raw)
To: Tomasz Bursztyka; +Cc: netfilter-devel
On Thu, Oct 03, 2013 at 02:28:05PM +0300, Tomasz Bursztyka wrote:
> - use proper option IDs
> - remove irrelevant flags on setting options mandatory
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-03 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 11:28 [iptables-nftables PATCH] lixtables: Fixes option issues in libxt_mangle.c Tomasz Bursztyka
2013-10-03 13:00 ` Pablo Neira Ayuso
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).