mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 05:05:12 +02:00
extensions: make print (iptables -L) output the same as save (-S)
This commit is contained in:
@@ -64,30 +64,6 @@ static void lscan_mt_check(unsigned int flags)
|
||||
{
|
||||
}
|
||||
|
||||
static void lscan_mt_print(const void *ip,
|
||||
const struct xt_entry_match *match, int numeric)
|
||||
{
|
||||
const struct xt_lscan_mtinfo *info = (const void *)(match->data);
|
||||
const char *s = "";
|
||||
|
||||
printf(" lscan ");
|
||||
if (info->match_stealth) {
|
||||
printf("STEALTH");
|
||||
s = ",";
|
||||
}
|
||||
if (info->match_syn) {
|
||||
printf("%sSYNSCAN", s);
|
||||
s = ",";
|
||||
}
|
||||
if (info->match_cn) {
|
||||
printf("%sCNSCAN", s);
|
||||
s = ",";
|
||||
}
|
||||
if (info->match_gr)
|
||||
printf("%sGRSCAN", s);
|
||||
printf(" ");
|
||||
}
|
||||
|
||||
static void lscan_mt_save(const void *ip, const struct xt_entry_match *match)
|
||||
{
|
||||
const struct xt_lscan_mtinfo *info = (const void *)(match->data);
|
||||
@@ -102,6 +78,13 @@ static void lscan_mt_save(const void *ip, const struct xt_entry_match *match)
|
||||
printf(" --grscan ");
|
||||
}
|
||||
|
||||
static void lscan_mt_print(const void *ip,
|
||||
const struct xt_entry_match *match, int numeric)
|
||||
{
|
||||
printf(" -m lscan");
|
||||
lscan_mt_save(ip, match);
|
||||
}
|
||||
|
||||
static struct xtables_match lscan_mt_reg = {
|
||||
.version = XTABLES_VERSION,
|
||||
.name = "lscan",
|
||||
|
Reference in New Issue
Block a user