From: Dwight Davis Date: Fri, 12 Aug 2011 21:02:09 +0000 (-0400) Subject: libxt_string: fix space around arguments X-Git-Tag: v1.4.12.1~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3716dfd7eac3afa7fb3098952550e510c8df0220;p=thirdparty%2Fiptables.git 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 --- 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