diff options
author | Jacek Tomasiak <jacek.tomasiak@gmail.com> | 2023-06-14 18:24:05 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-06-15 15:41:44 +0200 |
commit | 3251e0530b3dc718acc70168285d030e36d9aee4 (patch) | |
tree | 13c77f2189c43607a2a1463720710b8178b5a8a2 /src | |
parent | 7b899cb521ba80eaef96594adbc4fe98f30c02e4 (diff) |
conntrack: don't override mark when filtering by status
When creating new rules with (e.g. with `conntrack -I -m 123 -u UNSET ...`),
the mark from `-m` was overriden by value from `-u`.
This behavior was introduced in 1a5828f491c6a1593f30cb5f1551fe9f9cf76a8d
("conntrack: enable kernel-based status filtering with -L -u STATUS") for
filtering the output of `-L` option but caused a regression in other cases.
[ fw@strlen.de: likely copy&waste bug, status and mark are
completely different things ]
Fixes: 1a5828f491c6 ("conntrack: enable kernel-based status filtering with -L -u STATUS")
Signed-off-by: Jacek Tomasiak <jtomasiak@arista.com>
Signed-off-by: Jacek Tomasiak <jacek.tomasiak@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/conntrack.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/conntrack.c b/src/conntrack.c index bf72739..89800b7 100644 --- a/src/conntrack.c +++ b/src/conntrack.c @@ -3007,8 +3007,7 @@ static void do_parse(struct ct_cmd *ct_cmd, int argc, char *argv[]) if (tmpl->filter_status_kernel.mask == 0) tmpl->filter_status_kernel.mask = status; - tmpl->mark.value = status; - tmpl->filter_status_kernel.val = tmpl->mark.value; + tmpl->filter_status_kernel.val = status; tmpl->filter_status_kernel_set = true; break; case 'e': |