diff options
author | Phil Sutter <phil@nwl.cc> | 2018-08-23 17:43:25 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-08-24 10:05:51 +0200 |
commit | 85ed1ab6f3f1beb7ea0aee2af2bca70e14f72a9c (patch) | |
tree | 1c1b63335ff50161e6626fee6c3f1eec0f888f32 /extensions | |
parent | 6a46ca09aef110717e99293696761ebed1cd9596 (diff) |
extensions: libebt_mark: Drop mark_supplied check
Use of this static variable causes trouble as it affects all instances
of this target. So calling xs_init_target() for one instance invalidates
all the others.
Moving the variable into target private data seems not possible since
that would change the target's size and therefore it wouldn't match
anymore with what kernel expects.
So just get rid of it entirely. If a user "forgets" to set a mark value,
the default value of zero applies.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/libebt_mark.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/extensions/libebt_mark.c b/extensions/libebt_mark.c index 94f489e3..423c5c91 100644 --- a/extensions/libebt_mark.c +++ b/extensions/libebt_mark.c @@ -18,8 +18,6 @@ #include "iptables/nft.h" #include "iptables/nft-bridge.h" -static int mark_supplied; - #define MARK_TARGET '1' #define MARK_SETMARK '2' #define MARK_ORMARK '3' @@ -54,7 +52,6 @@ static void brmark_init(struct xt_entry_target *target) info->target = EBT_ACCEPT; info->mark = 0; - mark_supplied = 0; } #define OPT_MARK_TARGET 0x01 @@ -133,7 +130,6 @@ brmark_parse(int c, char **argv, int invert, unsigned int *flags, xtables_error(PARAMETER_PROBLEM, "Bad MARK value '%s'", optarg); - mark_supplied = 1; return 1; } @@ -162,9 +158,6 @@ static void brmark_print(const void *ip, const struct xt_entry_target *target, static void brmark_final_check(unsigned int flags) { - if (mark_supplied == 0) - xtables_error(PARAMETER_PROBLEM, "No mark value supplied"); - if (!flags) xtables_error(PARAMETER_PROBLEM, "You must specify some option"); |