]> git.ipfire.org Git - thirdparty/suricata.git/commit
lua: allow for real booleans in "needs" expression
authorJason Ish <jason.ish@oisf.net>
Wed, 26 Mar 2025 22:16:03 +0000 (16:16 -0600)
committerJason Ish <jason.ish@oisf.net>
Thu, 27 Mar 2025 16:55:07 +0000 (10:55 -0600)
commit7b3763ecad93c85281c7c5bb036b587133753a58
tree7577ba3a0d0b30b7e50d806043fac8d1eb4af6cc
parent640e4b343d842a3db9897adedfe245ff2fd47c5c
lua: allow for real booleans in "needs" expression

In addition to

    function init (args)
        local needs = {}
        needs["dnp3"] = tostring(true)
        return needs
    end

allow for

    function init (args)
        return {dnp3=true}
    end

with the idea that the former will be completely removed for 8.0.

This works with all existing SV tests and as a string value, any value
is considered "truthy".
src/detect-lua.c