diff mbox

[2/2] libxt_osf: fix bad location for location in --genre

Message ID 1364119760-5069-2-git-send-email-pablo@netfilter.org
State Accepted
Headers show

Commit Message

Pablo Neira Ayuso March 24, 2013, 10:09 a.m. UTC
From: Pablo Neira Ayuso <pablo@netfilter.org>

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

Reported-by: Bourne Without <blackhole@airposte.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 extensions/libxt_osf.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/extensions/libxt_osf.c b/extensions/libxt_osf.c
index 4e2139a..52dba47 100644
--- a/extensions/libxt_osf.c
+++ b/extensions/libxt_osf.c
@@ -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)