diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-10-29 18:57:42 +0200 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-10-29 18:57:42 +0200 |
commit | 600f38db82548a683775fd89b6e136673e924097 (patch) | |
tree | c97526e59daddebe70288aeabb67e702e141e569 /include | |
parent | 81defdb2c3ad0e461f6487dc75abb8d4fc77519b (diff) |
libxtables: change option precedence order to be intuitive
When using `-m mark --mark 2 -m connmark --mark 2`, the user currently
gets an error about the (libxt_mark) --mark option being used twice.
This is because libxt_connmark's option table does not override any
previous options. This patch changes this behavior, since the current
behavior does not allow connmark's option to be used at all, which is
illogical.
Cc: Florian Westphal <fw@strlen.de>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/xtables.h.in | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/xtables.h.in b/include/xtables.h.in index 9e47c2d2..c3d34af5 100644 --- a/include/xtables.h.in +++ b/include/xtables.h.in @@ -219,8 +219,9 @@ extern int xtables_insmod(const char *, const char *, bool); extern int xtables_load_ko(const char *, bool); extern int xtables_set_params(struct xtables_globals *xtp); extern void xtables_free_opts(int reset_offset); -extern struct option *xtables_merge_options(struct option *oldopts, - const struct option *newopts, unsigned int *option_offset); +extern struct option *xtables_merge_options(struct option *origopts, + struct option *oldopts, const struct option *newopts, + unsigned int *option_offset); extern int xtables_init_all(struct xtables_globals *xtp, uint8_t nfproto); extern struct xtables_match *xtables_find_match(const char *name, |