mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 05:05:12 +02:00
IPMARK: print missing --shift parameter
This commit is contained in:

committed by
Jan Engelhardt

parent
23e83aa04c
commit
9fb2ffe1d3
@@ -1,5 +1,8 @@
|
||||
|
||||
|
||||
- IPMARK: print missing --shift parameter
|
||||
|
||||
|
||||
Xtables-addons 1.16 (May 27 2009)
|
||||
=================================
|
||||
- RAWNAT: make iptable_rawpost compile with 2.6.30-rc5
|
||||
|
@@ -97,6 +97,7 @@ static int ipmark_tg_parse(int c, char **argv, int invert, unsigned int *flags,
|
||||
if (!xtables_strtoui(optarg, NULL, &n, 0, 128))
|
||||
xtables_param_act(XTF_BAD_VALUE, "IPMARK", "--shift", optarg);
|
||||
info->shift = n;
|
||||
*flags |= FL_SHIFT;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -117,14 +118,16 @@ ipmark_tg_print(const void *entry, const struct xt_entry_target *target,
|
||||
const struct xt_ipmark_tginfo *info = (const void *)target->data;
|
||||
|
||||
if (info->selector == XT_IPMARK_SRC)
|
||||
printf("IPMARK src ip");
|
||||
printf("IPMARK src ip ");
|
||||
else
|
||||
printf("IPMARK dst ip");
|
||||
printf("IPMARK dst ip ");
|
||||
|
||||
if (info->shift != 0)
|
||||
printf("shift %u ", (unsigned int)info->shift);
|
||||
if (info->andmask != ~0U)
|
||||
printf(" and 0x%x ", (unsigned int)info->andmask);
|
||||
printf("and 0x%x ", (unsigned int)info->andmask);
|
||||
if (info->ormask != 0)
|
||||
printf(" or 0x%x ", (unsigned int)info->ormask);
|
||||
printf("or 0x%x ", (unsigned int)info->ormask);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -137,6 +140,8 @@ ipmark_tg_save(const void *entry, const struct xt_entry_target *target)
|
||||
else
|
||||
printf("--addr dst ");
|
||||
|
||||
if (info->shift != 0)
|
||||
printf("--shift %u ", (unsigned int)info->shift);
|
||||
if (info->andmask != ~0U)
|
||||
printf("--and-mask 0x%x ", (unsigned int)info->andmask);
|
||||
if (info->ormask != 0)
|
||||
|
Reference in New Issue
Block a user