netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@medozas.de>
To: kaber@trash.net
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 6/6] libxt_string: fix space around arguments
Date: Sat, 20 Aug 2011 21:24:53 +0200	[thread overview]
Message-ID: <1313868294-21471-7-git-send-email-jengelh@medozas.de> (raw)
In-Reply-To: <1313868294-21471-1-git-send-email-jengelh@medozas.de>

From: Dwight Davis <sivad_thgiwd@yahoo.ca>

Fix oversight from commit v1.4.11~80.

References: http://bugs.debian.org/637499
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 extensions/libxt_string.c |    4 ++--
 tests/options-most.rules  |    1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/extensions/libxt_string.c b/extensions/libxt_string.c
index 8cee335..257f5f8 100644
--- a/extensions/libxt_string.c
+++ b/extensions/libxt_string.c
@@ -229,7 +229,7 @@ print_hex_string(const char *str, const unsigned short int len)
 {
 	unsigned int i;
 	/* start hex block */
-	printf("\"|");
+	printf(" \"|");
 	for (i=0; i < len; i++) {
 		/* see if we need to prepend a zero */
 		if ((unsigned char) str[i] <= 0x0F)
@@ -238,7 +238,7 @@ print_hex_string(const char *str, const unsigned short int len)
 			printf("%x", (unsigned char) str[i]);
 	}
 	/* close hex block */
-	printf("|\" ");
+	printf("|\"");
 }
 
 static void
diff --git a/tests/options-most.rules b/tests/options-most.rules
index c2e30f2..4a3cd99 100644
--- a/tests/options-most.rules
+++ b/tests/options-most.rules
@@ -37,6 +37,7 @@
 -A INPUT -p tcp -m recent --rcheck --name DEFAULT --rsource
 -A INPUT -p tcp -m socket --transparent
 -A INPUT -p tcp -m string --string "foobar" --algo kmp --from 1 --to 2 --icase
+-A INPUT -p tcp -m string --hex-string "|00|" --algo kmp --from 1 --to 2 --icase
 -A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN
 -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN
 -A INPUT -p tcp -m tos --tos 0xff/0x01
-- 
1.7.3.4


  parent reply	other threads:[~2011-08-20 19:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-20 19:24 Fixes to iptables-1.4.12 Jan Engelhardt
2011-08-20 19:24 ` [PATCH 1/6] libxt_u32: fix missing allowance for inversion Jan Engelhardt
     [not found]   ` <CAA93jw6mpDL6rLXM+9SpAhafkDdKoSfhAxU8UM87vUqjuzjYJw@mail.gmail.com>
2011-08-21  7:25     ` Jan Engelhardt
2011-08-22 16:31       ` Dave Taht
2011-08-23  7:34         ` Jan Engelhardt
2011-08-20 19:24 ` [PATCH 2/6] libxt_set: update man page about kernel support on the feature Jan Engelhardt
2011-08-20 19:24 ` [PATCH 3/6] libxt_tcp: always print the mask parts Jan Engelhardt
2011-08-20 19:24 ` [PATCH 4/6] doc: fix typo in libxt_TRACE Jan Engelhardt
2011-08-20 19:24 ` [PATCH 5/6] libxt_set: put differing variable names in directly Jan Engelhardt
2011-08-20 19:24 ` Jan Engelhardt [this message]
2011-08-21  9:31 ` Fixes to iptables-1.4.12 Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1313868294-21471-7-git-send-email-jengelh@medozas.de \
    --to=jengelh@medozas.de \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).