summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDwight Davis <sivad_thgiwd@yahoo.ca>2011-08-12 17:02:09 -0400
committerJan Engelhardt <jengelh@medozas.de>2011-08-20 21:16:17 +0200
commit3716dfd7eac3afa7fb3098952550e510c8df0220 (patch)
treeeffb5f857be9bef11af575e73a134be90a407e6d
parent886a89bf378e079e807cda2eb43573ca6c886d0a (diff)
libxt_string: fix space around arguments
Fix oversight from commit v1.4.11~80. References: http://bugs.debian.org/637499 Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
-rw-r--r--extensions/libxt_string.c4
-rw-r--r--tests/options-most.rules1
2 files changed, 3 insertions, 2 deletions
diff --git a/extensions/libxt_string.c b/extensions/libxt_string.c
index 8cee3359..257f5f85 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 c2e30f24..4a3cd99f 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