]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
libxt_string: fix space around arguments
authorDwight Davis <sivad_thgiwd@yahoo.ca>
Fri, 12 Aug 2011 21:02:09 +0000 (17:02 -0400)
committerJan Engelhardt <jengelh@medozas.de>
Sat, 20 Aug 2011 19:16:17 +0000 (21:16 +0200)
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
tests/options-most.rules

index 8cee3359e7a15a9842fa4d96e2de0ffaf302e581..257f5f8535ab0cb12601bc05b2a03654bbdf4060 100644 (file)
@@ -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
index c2e30f246da82c367581a60f297943b61a2909b1..4a3cd99f8227907ba86ecf46bbfc7a3d9b4d2f82 100644 (file)
@@ -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