mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 13:44:56 +02:00
LOGMARK: fix comma output in ctstatus= list
This commit is contained in:
@@ -37,6 +37,7 @@ logmark_tg(struct sk_buff *skb, const struct net_device *in,
|
|||||||
const struct xt_logmark_tginfo *info = targinfo;
|
const struct xt_logmark_tginfo *info = targinfo;
|
||||||
const struct nf_conn *ct;
|
const struct nf_conn *ct;
|
||||||
enum ip_conntrack_info ctinfo;
|
enum ip_conntrack_info ctinfo;
|
||||||
|
bool prev = false;
|
||||||
|
|
||||||
printk("<%u>%.*s""hook=%s nfmark=0x%x secmark=0x%x classify=0x%x",
|
printk("<%u>%.*s""hook=%s nfmark=0x%x secmark=0x%x classify=0x%x",
|
||||||
info->level, (unsigned int)sizeof(info->prefix), info->prefix,
|
info->level, (unsigned int)sizeof(info->prefix), info->prefix,
|
||||||
@@ -64,14 +65,16 @@ logmark_tg(struct sk_buff *skb, const struct net_device *in,
|
|||||||
printk(",DNAT");
|
printk(",DNAT");
|
||||||
|
|
||||||
printk(" ctstatus=");
|
printk(" ctstatus=");
|
||||||
if (ct->status & IPS_EXPECTED)
|
if (ct->status & IPS_EXPECTED) {
|
||||||
printk("EXPECTED");
|
printk("EXPECTED");
|
||||||
|
prev = true;
|
||||||
|
}
|
||||||
if (ct->status & IPS_SEEN_REPLY)
|
if (ct->status & IPS_SEEN_REPLY)
|
||||||
printk(",SEEN_REPLY");
|
printk("%s""SEEN_REPLY", prev++ ? "," : "");
|
||||||
if (ct->status & IPS_ASSURED)
|
if (ct->status & IPS_ASSURED)
|
||||||
printk(",ASSURED");
|
printk("%s""ASSURED", prev++ ? "," : "");
|
||||||
if (ct->status & IPS_CONFIRMED)
|
if (ct->status & IPS_CONFIRMED)
|
||||||
printk(",CONFIRMED");
|
printk("%s""CONFIRMED", prev++ ? "," : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
printk("\n");
|
printk("\n");
|
||||||
|
Reference in New Issue
Block a user