From 600f38db82548a683775fd89b6e136673e924097 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 29 Oct 2010 18:57:42 +0200 Subject: 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 Signed-off-by: Jan Engelhardt Signed-off-by: Patrick McHardy --- include/xtables.h.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') 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, -- cgit v1.2.3