HttpContextData* hcd = IpsContextData::get<HttpContextData>(HttpContextData::ips_id);
hcd->current_section = section;
- section->add_ips_context(DetectionEngine::get_context());
}
HttpMsgSection* HttpContextData::clear_snapshot(IpsContext* context)
HttpContextData::save_snapshot(this);
}
-HttpMsgSection::~HttpMsgSection()
-{
- // FIXIT-L This clear call is to handle premature deletion (before offload completes)
- // of message sections due to session deletion
- if ( ips_context )
- HttpContextData::clear_snapshot(ips_context);
-}
-
bool HttpMsgSection::detection_required() const
{
return ((msg_text.length() > 0) && (get_inspection_section() != IS_NONE)) ||
{
transaction->clear_section();
cleared = true;
- ips_context = nullptr;
}
#ifdef REG_TEST
class HttpMsgSection
{
public:
- virtual ~HttpMsgSection();
+ virtual ~HttpMsgSection() = default;
virtual HttpEnums::InspectSection get_inspection_section() const
{ return HttpEnums::IS_NONE; }
virtual bool detection_required() const;
{ return trailer[source_id]; }
virtual HttpMsgBody* get_body() { return nullptr; }
- void add_ips_context(snort::IpsContext* context) { ips_context = context; }
-
// Minimum necessary processing for every message
virtual void analyze() = 0;
HttpEnums::MethodId method_id;
const bool tcp_close;
- snort::IpsContext* ips_context = nullptr;
// Pointers to related message sections in the same transaction
HttpMsgRequest* request;
HttpMsgStatus* status;