From 7b79b9458d0b3f5675618d3bbed5c903b05c36d1 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 20 Dec 2014 13:39:23 +0100 Subject: [PATCH] xbits: implement ip_src/ip_dst support Just a wrapper for regular 'hostbits'. --- src/detect-hostbits.h | 2 ++ src/detect-xbits.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/detect-hostbits.h b/src/detect-hostbits.h index 00880b9eb3..6e9c7f5f0e 100644 --- a/src/detect-hostbits.h +++ b/src/detect-hostbits.h @@ -26,6 +26,8 @@ #include "detect-xbits.h" +int DetectXbitMatchHost(Packet *p, const DetectXbitsData *xd); + /* prototypes */ void DetectHostbitsRegister (void); diff --git a/src/detect-xbits.c b/src/detect-xbits.c index 14c3f06503..488e3454a4 100644 --- a/src/detect-xbits.c +++ b/src/detect-xbits.c @@ -30,6 +30,7 @@ #include "flow.h" #include "flow-util.h" #include "detect-xbits.h" +#include "detect-hostbits.h" #include "util-spm.h" #include "detect-engine-sigorder.h" @@ -188,6 +189,9 @@ int DetectXbitMatch (ThreadVars *t, DetectEngineThreadCtx *det_ctx, Packet *p, S return 0; switch (fd->type) { + case VAR_TYPE_HOST_BIT: + return DetectXbitMatchHost(p, (const DetectXbitsData *)fd); + break; case VAR_TYPE_IPPAIR_BIT: return DetectXbitMatchIPPair(p, (const DetectXbitsData *)fd); break;