diff options
author | Florian Westphal <fw@strlen.de> | 2023-11-07 12:15:40 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2023-11-07 23:40:14 +0100 |
commit | a3ae0dc4b34046e0d7893841e86b93c4c010632f (patch) | |
tree | 36aaee979fcb94cd57b932773d376356e0648bfa /extensions/libxt_MARK.c | |
parent | 50f40b2c05e11ab0276b2dd6d860855968358bb5 (diff) |
extensions: MARK: fix arptables support
arptables "--set-mark" is really just "--or-mark".
This bug is also in arptables-legacy.
Fix this and add test cases.
Note that the test for "16" vs. "0x16" is intentional,
arptables parser is buggy and always uses "%x".
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libxt_MARK.c')
-rw-r--r-- | extensions/libxt_MARK.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/extensions/libxt_MARK.c b/extensions/libxt_MARK.c index 100f6a38..d6eacfcb 100644 --- a/extensions/libxt_MARK.c +++ b/extensions/libxt_MARK.c @@ -290,6 +290,7 @@ mark_tg_arp_parse(int c, char **argv, int invert, unsigned int *flags, return 0; } info->mark = i; + info->mask = 0xffffffffU; if (*flags) xtables_error(PARAMETER_PROBLEM, "MARK: Can't specify --set-mark twice"); @@ -430,6 +431,7 @@ static struct xtables_target mark_tg_reg[] = { .save = mark_tg_arp_save, .parse = mark_tg_arp_parse, .extra_opts = mark_tg_arp_opts, + .xlate = mark_tg_xlate, }, }; |