]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
extensions: string: Clarify description of --to
authorPhil Sutter <phil@nwl.cc>
Thu, 12 Oct 2023 15:54:53 +0000 (17:54 +0200)
committerPhil Sutter <phil@nwl.cc>
Thu, 12 Oct 2023 16:07:28 +0000 (18:07 +0200)
String match indeed returns a match as long as the given pattern starts
in the range of --from and --to, update the text accordingly.
Also add a note regarding fragment boundaries.

Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1707
extensions/libxt_string.man

index 2a470ece19c9ddde3293bce97ce9f78ccc96f562..efdda492ae78d042e56fb5d3dc0db3b8dd794742 100644 (file)
@@ -7,9 +7,13 @@ Select the pattern matching strategy. (bm = Boyer-Moore, kmp = Knuth-Pratt-Morri
 Set the offset from which it starts looking for any matching. If not passed, default is 0.
 .TP
 \fB\-\-to\fP \fIoffset\fP
-Set the offset up to which should be scanned. That is, byte \fIoffset\fP-1
-(counting from 0) is the last one that is scanned.
+Set the offset up to which should be scanned. If the pattern does not start
+within this offset, it is not considered a match.
 If not passed, default is the packet size.
+A second function of this parameter is instructing the kernel how much data
+from the packet should be provided. With non-linear skbuffs (e.g. due to
+fragmentation), a pattern extending past this offset may not be found. Also see
+the related note below about Boyer-Moore algorithm in these cases.
 .TP
 [\fB!\fP] \fB\-\-string\fP \fIpattern\fP
 Matches the given pattern.