mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 13:15:12 +02:00
extensions: make print (iptables -L) output the same as save (-S)
This commit is contained in:
@@ -62,15 +62,6 @@ static void dhcpmac_mt_check(unsigned int flags)
|
||||
"--mac parameter required");
|
||||
}
|
||||
|
||||
static void dhcpmac_mt_print(const void *ip,
|
||||
const struct xt_entry_match *match, int numeric)
|
||||
{
|
||||
const struct dhcpmac_info *info = (void *)match->data;
|
||||
|
||||
printf(" dhcpmac %s" DH_MAC_FMT "/%u ",
|
||||
info->invert ? "!" : "", DH_MAC_HEX(info->addr), info->mask);
|
||||
}
|
||||
|
||||
static void dhcpmac_mt_save(const void *ip,
|
||||
const struct xt_entry_match *match)
|
||||
{
|
||||
@@ -82,6 +73,13 @@ static void dhcpmac_mt_save(const void *ip,
|
||||
DH_MAC_HEX(info->addr), info->mask);
|
||||
}
|
||||
|
||||
static void dhcpmac_mt_print(const void *ip,
|
||||
const struct xt_entry_match *match, int numeric)
|
||||
{
|
||||
printf(" -m dhcpmac");
|
||||
dhcpmac_mt_save(ip, match);
|
||||
}
|
||||
|
||||
static struct xtables_match dhcpmac_mt_reg = {
|
||||
.version = XTABLES_VERSION,
|
||||
.name = "dhcpmac",
|
||||
|
Reference in New Issue
Block a user