]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
userguide: fix explanation about bsize ranges 10277/head
authorJuliana Fajardini <jufajardini@oisf.net>
Wed, 24 Jan 2024 15:00:41 +0000 (12:00 -0300)
committerVictor Julien <victor@inliniac.net>
Tue, 30 Jan 2024 08:35:18 +0000 (09:35 +0100)
Our code handles Uint ranges as exclusive, but for bsize, our
documentation stated that they're inclusive.

Cf. from uint.rs:

    DetectUintMode::DetectUintModeRange => {
        if val > x.arg1 && val < x.arg2 {
            return true;
        }
    }

Task #6708

doc/userguide/rules/payload-keywords.rst

index bc2bc42d0829d112957785a0e4e094d701ab0a5c..aa7d5c007332a2f8979da8116ba568a2b043bfc5 100644 (file)
@@ -284,7 +284,7 @@ bsize uses an :ref:`unsigned 64-bit integer <rules-integer-keywords>`.
 
 An optional operator can be specified; if no operator is present, the operator will
 default to '='. When a relational operator is used, e.g., '<', '>' or '<>' (range),
-the bsize value will be compared using the relational operator. Ranges are inclusive.
+the bsize value will be compared using the relational operator. Ranges are exclusive.
 
 If one or more ``content`` keywords precedes ``bsize``, each occurrence of ``content``
 will be inspected and an error will be raised if the content length and the bsize
@@ -327,6 +327,9 @@ Examples of ``bsize`` in a rule:
 
    alert dns any any -> any any (msg:"test bsize rule"; dns.query; content:"middle"; bsize:6<>15; sid:126; rev:1;)
 
+To emphasize how range works: in the example above, a match will occur if
+``bsize`` is greater than 6 and less than 15.
+
 dsize
 -----