mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 13:44:56 +02:00
IPMARK: omit printing unset mask
This commit is contained in:
@@ -99,11 +99,14 @@ ipmark_tg_print(const void *entry, const struct xt_entry_target *target,
|
|||||||
const struct xt_ipmark_tginfo *info = (const void *)target->data;
|
const struct xt_ipmark_tginfo *info = (const void *)target->data;
|
||||||
|
|
||||||
if (info->selector == XT_IPMARK_SRC)
|
if (info->selector == XT_IPMARK_SRC)
|
||||||
printf("IPMARK src");
|
printf("IPMARK src ip");
|
||||||
else
|
else
|
||||||
printf("IPMARK dst");
|
printf("IPMARK dst ip");
|
||||||
printf(" ip and 0x%x or 0x%x",
|
|
||||||
(unsigned int)info->andmask, (unsigned int)info->ormask);
|
if (info->andmask != ~0U)
|
||||||
|
printf(" and 0x%x ", (unsigned int)info->andmask);
|
||||||
|
if (info->ormask != 0)
|
||||||
|
printf(" or 0x%x ", (unsigned int)info->ormask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user