* [iptables PATCH 0/2] Fix up string match man page
@ 2023-10-24 11:43 Phil Sutter
2023-10-24 11:43 ` [iptables PATCH 1/2] Revert "extensions: string: Clarify description of --to" Phil Sutter
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Phil Sutter @ 2023-10-24 11:43 UTC (permalink / raw)
To: netfilter-devel; +Cc: Pablo Neira Ayuso
My earlier adjustment to describe the actual behaviour is obsolete given
that I adjusted said behaviour upon request. Revert the change in patch
1 and introduce a new copy-edit in patch 2 making the text a bit more
clear and removing a mistake.
I will fold both commits before pushing them out. Keeping them separated
for the sake of easier reviews.
Phil Sutter (2):
Revert "extensions: string: Clarify description of --to"
extensions: string: Clarify description of --to
extensions/libxt_string.man | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [iptables PATCH 1/2] Revert "extensions: string: Clarify description of --to"
2023-10-24 11:43 [iptables PATCH 0/2] Fix up string match man page Phil Sutter
@ 2023-10-24 11:43 ` Phil Sutter
2023-10-24 11:43 ` [iptables PATCH 2/2] extensions: string: Clarify description of --to Phil Sutter
2023-10-25 15:27 ` [iptables PATCH 0/2] Fix up string match man page Phil Sutter
2 siblings, 0 replies; 4+ messages in thread
From: Phil Sutter @ 2023-10-24 11:43 UTC (permalink / raw)
To: netfilter-devel; +Cc: Pablo Neira Ayuso
This reverts commit 920ece2b392fb83bd26416e0e6f8f6a847aacbaa.
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
extensions/libxt_string.man | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/extensions/libxt_string.man b/extensions/libxt_string.man
index efdda492ae78d..2a470ece19c9d 100644
--- a/extensions/libxt_string.man
+++ b/extensions/libxt_string.man
@@ -7,13 +7,9 @@ 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. If the pattern does not start
-within this offset, it is not considered a match.
+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.
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.
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [iptables PATCH 2/2] extensions: string: Clarify description of --to
2023-10-24 11:43 [iptables PATCH 0/2] Fix up string match man page Phil Sutter
2023-10-24 11:43 ` [iptables PATCH 1/2] Revert "extensions: string: Clarify description of --to" Phil Sutter
@ 2023-10-24 11:43 ` Phil Sutter
2023-10-25 15:27 ` [iptables PATCH 0/2] Fix up string match man page Phil Sutter
2 siblings, 0 replies; 4+ messages in thread
From: Phil Sutter @ 2023-10-24 11:43 UTC (permalink / raw)
To: netfilter-devel; +Cc: Pablo Neira Ayuso
Since kernel commit c4eee56e14fe ("net: skb_find_text: Ignore patterns
extending past 'to'"), pattern scanning no longer happens past --to
offset even if skb_seq_read() returned a larger block. Point this out in
the description and also drop the '-1' offset which is not true as
kernel's selftest in tools/testing/selftests/netfilter/xt_string.sh
shows.
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1707
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
extensions/libxt_string.man | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/extensions/libxt_string.man b/extensions/libxt_string.man
index 2a470ece19c9d..bdeb0a6200a88 100644
--- a/extensions/libxt_string.man
+++ b/extensions/libxt_string.man
@@ -7,8 +7,9 @@ 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. That is, byte \fIoffset\fP
+(counting from 0) is the last one that is scanned and the maximum position of
+\fIpattern\fP's last character.
If not passed, default is the packet size.
.TP
[\fB!\fP] \fB\-\-string\fP \fIpattern\fP
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [iptables PATCH 0/2] Fix up string match man page
2023-10-24 11:43 [iptables PATCH 0/2] Fix up string match man page Phil Sutter
2023-10-24 11:43 ` [iptables PATCH 1/2] Revert "extensions: string: Clarify description of --to" Phil Sutter
2023-10-24 11:43 ` [iptables PATCH 2/2] extensions: string: Clarify description of --to Phil Sutter
@ 2023-10-25 15:27 ` Phil Sutter
2 siblings, 0 replies; 4+ messages in thread
From: Phil Sutter @ 2023-10-25 15:27 UTC (permalink / raw)
To: netfilter-devel; +Cc: Pablo Neira Ayuso
On Tue, Oct 24, 2023 at 01:43:55PM +0200, Phil Sutter wrote:
> My earlier adjustment to describe the actual behaviour is obsolete given
> that I adjusted said behaviour upon request. Revert the change in patch
> 1 and introduce a new copy-edit in patch 2 making the text a bit more
> clear and removing a mistake.
>
> I will fold both commits before pushing them out. Keeping them separated
> for the sake of easier reviews.
Patch applied after folding the series into one.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-25 15:28 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-24 11:43 [iptables PATCH 0/2] Fix up string match man page Phil Sutter
2023-10-24 11:43 ` [iptables PATCH 1/2] Revert "extensions: string: Clarify description of --to" Phil Sutter
2023-10-24 11:43 ` [iptables PATCH 2/2] extensions: string: Clarify description of --to Phil Sutter
2023-10-25 15:27 ` [iptables PATCH 0/2] Fix up string match man page Phil Sutter
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).