[Oisf-devel] [COMMIT] OISF branch, master, updated. suricata-1.4-184-gf29e545
noreply at openinfosecfoundation.org
noreply at openinfosecfoundation.org
Wed May 22 13:50:45 UTC 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "OISF".
The branch, master has been updated
via f29e5459e68bf8e1a5614e772953748be6425451 (commit)
via f312486c6e7bc35c72b6b7fdaa94ab5ca42c009b (commit)
via 72f6bc2aeddadf45c8c3389712615985b7c8e1d3 (commit)
via c3c3cd76e5c0e920c2be9e58f137c937f6e1d79e (commit)
via 57d3cd97f39d7fc5f41c7a5f89e221a8078f988e (commit)
via 6e18ed0489c7d0026210b323fdb740ec900e07c2 (commit)
from 3db717db6d05aee16b00cdbdd1184af2063a54aa (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f29e5459e68bf8e1a5614e772953748be6425451
Author: Victor Julien <victor at inliniac.net>
Date: Tue Apr 23 11:58:49 2013 +0200
luajit/flowint: add ScFlowintIncr & ScFlowintDecr
Add flowint lua functions for incrementing and decrementing flowints.
First use creates the var and inits to 0. So a call:
a = ScFlowintIncr(0)
Results in a == 1.
If the var reached UINT_MAX (2^32), it's not further incremented. If the
var reaches 0 it's not decremented further.
Calling ScFlowintDecr on a uninitialized var will init it to 0.
Example script:
function init (args)
local needs = {}
needs["http.request_headers"] = tostring(true)
needs["flowint"] = {"cnt_incr"}
return needs
end
function match(args)
a = ScFlowintIncr(0);
if a == 23 then
return 1
end
return 0
end
return 0
This script matches the 23rd time it's invoked on a flow.
commit f312486c6e7bc35c72b6b7fdaa94ab5ca42c009b
Author: Victor Julien <victor at inliniac.net>
Date: Mon Apr 22 17:56:29 2013 +0200
flowvar/luajit: make 'sets' real time. Needed for cross HTTP-header matching.
commit 72f6bc2aeddadf45c8c3389712615985b7c8e1d3
Author: Victor Julien <victor at inliniac.net>
Date: Mon Apr 22 17:50:43 2013 +0200
luajit: add flowint support
Expose ScFlowintGet and ScFlowintSet functions to luajit. These set
flowints in real time, regardless of rule and/or script match.
Example:
function init (args)
local needs = {}
needs["http.request_headers"] = tostring(true)
needs["flowint"] = {"cnt"}
return needs
end
function match(args)
a = ScFlowintGet(0);
if a then
ScFlowintSet(0, a + 1)
else
ScFlowintSet(0, 1)
end
a = ScFlowintGet(0);
if a == 23 then
return 1
end
return 0
end
return 0
Script's init call first registers "cnt" at id 0, then 0 is used to use
this var.
commit c3c3cd76e5c0e920c2be9e58f137c937f6e1d79e
Author: Victor Julien <victor at inliniac.net>
Date: Mon Apr 22 17:48:51 2013 +0200
flowvar/flowint: split set functions into normal and NoLock version, where the latter won't lock the flow.
commit 57d3cd97f39d7fc5f41c7a5f89e221a8078f988e
Author: Victor Julien <victor at inliniac.net>
Date: Mon Apr 22 16:10:50 2013 +0200
flowvar/flowint: make local function static
commit 6e18ed0489c7d0026210b323fdb740ec900e07c2
Author: Victor Julien <victor at inliniac.net>
Date: Mon Apr 15 19:59:28 2013 +0200
luajit flowvar support
This patch adds flowvar support to luajit. It does so by exposing two special
C functions to the luajit scripts: ScFlowvarGet and ScFlowvarSet.
-----------------------------------------------------------------------
Summary of changes:
src/Makefile.am | 1 +
src/detect-engine-content-inspection.c | 9 +-
src/detect-engine-content-inspection.h | 6 +
src/detect-engine-state.c | 4 +
src/detect-flowvar.c | 32 +-
src/detect-flowvar.h | 4 +-
src/detect-luajit-extensions.c | 660 +++++++++++++
...detect-http-hh.h => detect-luajit-extensions.h} | 16 +-
src/detect-luajit.c | 1017 +++++++++++++++++++-
src/detect-luajit.h | 13 +-
src/detect-pcre.c | 33 +-
src/detect.c | 2 +-
src/detect.h | 6 +
src/flow-var.c | 40 +-
src/flow-var.h | 2 +
15 files changed, 1786 insertions(+), 59 deletions(-)
create mode 100644 src/detect-luajit-extensions.c
copy src/{detect-http-hh.h => detect-luajit-extensions.h} (67%)
hooks/post-receive
--
OISF
More information about the Oisf-devel
mailing list