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:
@@ -57,17 +57,6 @@ static void gradm_mt_check(unsigned int flags)
|
||||
{
|
||||
}
|
||||
|
||||
static void gradm_mt_print(const void *ip, const struct xt_entry_match *match,
|
||||
int numeric)
|
||||
{
|
||||
const struct xt_gradm_mtinfo *info = (const void *)match->data;
|
||||
|
||||
if (info->invflags)
|
||||
printf("gradm: disabled");
|
||||
else
|
||||
printf("gradm: enabled");
|
||||
}
|
||||
|
||||
static void gradm_mt_save(const void *ip, const struct xt_entry_match *match)
|
||||
{
|
||||
const struct xt_gradm_mtinfo *info = (const void *)match->data;
|
||||
@@ -78,6 +67,13 @@ static void gradm_mt_save(const void *ip, const struct xt_entry_match *match)
|
||||
printf(" --enabled ");
|
||||
}
|
||||
|
||||
static void gradm_mt_print(const void *ip, const struct xt_entry_match *match,
|
||||
int numeric)
|
||||
{
|
||||
printf(" -m gradm");
|
||||
gradm_mt_save(ip, match);
|
||||
}
|
||||
|
||||
static struct xtables_match gradm_mt_reg = {
|
||||
.family = NFPROTO_UNSPEC,
|
||||
.name = "gradm",
|
||||
|
Reference in New Issue
Block a user