mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 21:25:12 +02:00
extensions: make print (iptables -L) output the same as save (-S)
This commit is contained in:
@@ -61,15 +61,6 @@ static void dhcpmac_tg_check(unsigned int flags)
|
||||
"--set-mac parameter required");
|
||||
}
|
||||
|
||||
static void dhcpmac_tg_print(const void *ip,
|
||||
const struct xt_entry_target *target, int numeric)
|
||||
{
|
||||
const struct dhcpmac_info *info = (void *)target->data;
|
||||
|
||||
printf(" DHCPMAC %s" DH_MAC_FMT "/%u ",
|
||||
info->invert ? "!" : "", DH_MAC_HEX(info->addr), info->mask);
|
||||
}
|
||||
|
||||
static void dhcpmac_tg_save(const void *ip,
|
||||
const struct xt_entry_target *target)
|
||||
{
|
||||
@@ -81,6 +72,13 @@ static void dhcpmac_tg_save(const void *ip,
|
||||
DH_MAC_HEX(info->addr), info->mask);
|
||||
}
|
||||
|
||||
static void dhcpmac_tg_print(const void *ip,
|
||||
const struct xt_entry_target *target, int numeric)
|
||||
{
|
||||
printf(" -j DHCPMAC");
|
||||
dhcpmac_tg_save(ip, target);
|
||||
}
|
||||
|
||||
static struct xtables_target dhcpmac_tg_reg = {
|
||||
.version = XTABLES_VERSION,
|
||||
.name = "DHCPMAC",
|
||||
|
Reference in New Issue
Block a user