Skip to contentSkip to conversation

libxt_osf: fix missing --ttl and --log in save output

PATCH New [email protected] 1 participant 2 messages Mar 24, 2013 netfilter

lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/2 libxt_osf: fix missing --ttl and --log in save output

From: Pablo Neira Ayuso <[email protected]>

closes http://bugzilla.netfilter.org/show_bug.cgi?id=805

---
 extensions/libxt_osf.c |    4 ++++
 1 file changed, 4 insertions(+)
extensions/libxt_osf.c +4 -0
index 88274a0..4e2139a 100644
@@ -93,6 +93,10 @@ static void osf_save(const void *ip, const struct xt_entry_match *match)
 	const struct xt_osf_info *info = (const struct xt_osf_info*) match->data;
 
 	printf(" --genre %s%s", (info->flags & XT_OSF_INVERT) ? "! ": "", info->genre);
+	if (info->flags & XT_OSF_TTL)
+		printf(" --ttl %u", info->ttl);
+	if (info->flags & XT_OSF_LOG)
+		printf(" --log %u", info->loglevel);
 }
 
 static struct xtables_match osf_match = {
Signature · 1 line
1.7.10.4
author maintainer
#1 lore raw

PATCH 2/2 libxt_osf: fix bad location for location in --genre

From: Pablo Neira Ayuso <[email protected]>

closes http://bugzilla.netfilter.org/show_bug.cgi?id=805

---
 extensions/libxt_osf.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
extensions/libxt_osf.c +4 -1
index 4e2139a..52dba47 100644
@@ -92,7 +92,10 @@ static void osf_save(const void *ip, const struct xt_entry_match *match)
 {
 	const struct xt_osf_info *info = (const struct xt_osf_info*) match->data;
 
-	printf(" --genre %s%s", (info->flags & XT_OSF_INVERT) ? "! ": "", info->genre);
+	if (info->flags & XT_OSF_INVERT)
+		printf(" !");
+
+	printf(" --genre %s", info->genre);
 	if (info->flags & XT_OSF_TTL)
 		printf(" --ttl %u", info->ttl);
 	if (info->flags & XT_OSF_LOG)
Signature · 1 line
1.7.10.4