summaryrefslogtreecommitdiffstats
path: root/extensions/libebt_mark_m.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2023-12-21 13:24:09 +0100
committerPhil Sutter <phil@nwl.cc>2024-01-10 23:33:24 +0100
commitb1ae6a45c9f38a60a13d9ecb88dcbeb12e5d13e0 (patch)
tree266b5b45b82dc62ad087562088c87e96bd74b557 /extensions/libebt_mark_m.c
parentf4721951baca81b7d74c5551d0f5c599dbb89bf1 (diff)
ebtables: Default to extrapositioned negations
ebtables-nft has always supported both intra- and extrapositioned negations but defaulted to intrapositioned when printing/saving rules. With commit 58d364c7120b5 ("ebtables: Use do_parse() from xshared") though, it started to warn about intrapositioned negations. So change the default to avoid mandatory warnings when e.g. loading previously dumped rulesets. Also adjust test cases, help texts and ebtables-nft.8 accordingly. Cc: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'extensions/libebt_mark_m.c')
-rw-r--r--extensions/libebt_mark_m.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/libebt_mark_m.c b/extensions/libebt_mark_m.c
index f17fe99a..8ee17207 100644
--- a/extensions/libebt_mark_m.c
+++ b/extensions/libebt_mark_m.c
@@ -29,7 +29,7 @@ static void brmark_m_print_help(void)
{
printf(
"mark option:\n"
-"--mark [!] [value][/mask]: Match nfmask value (see man page)\n");
+"[!] --mark [value][/mask]: Match nfmask value (see man page)\n");
}
static void brmark_m_parse(struct xt_option_call *cb)
@@ -63,9 +63,9 @@ static void brmark_m_print(const void *ip, const struct xt_entry_match *match,
{
struct ebt_mark_m_info *info = (struct ebt_mark_m_info *)match->data;
- printf("--mark ");
if (info->invert)
printf("! ");
+ printf("--mark ");
if (info->bitmask == EBT_MARK_OR)
printf("/0x%lx ", info->mask);
else if (info->mask != 0xffffffff)