-- fixed inspector reinit
-- fixed byte_extract and byte_jump endianisms
-- suspend active when purging caches
+-- temporary support for legacy paf_max
127
-- REG_TEST out logging tcp options for rebuilt packets to match snort bug
static THREAD_LOCAL uint8_t pdu_buf[65536];
static THREAD_LOCAL StreamBuffer str_buf;
+unsigned StreamSplitter::max_pdu = 16384;
+
+void StreamSplitter::set_max(unsigned m)
+{ max_pdu = m; }
+
unsigned StreamSplitter::max()
-{ return 16384; } // subclasses should override this
+{ return max_pdu; }
const StreamBuffer* StreamSplitter::reassemble(
Flow*, unsigned, unsigned offset, const uint8_t* p,
virtual bool is_paf() { return false; };
virtual unsigned max();
+ // FIXIT-L this is temporary for legacy paf_max required only
+ // for HI; it is not appropriate for multiple stream_tcp with
+ // different paf_max; the HI splitter should pull from there
+ static void set_max(unsigned);
+
virtual void reset() { };
virtual void update() { };
StreamSplitter(bool b) { c2s = b; };
private:
- static unsigned s_max;
+ static unsigned max_pdu;
bool c2s;
};
#include "main/snort.h"
#include "stream/flush_bucket.h"
+#include "stream/stream_splitter.h"
//-------------------------------------------------------------------------
// inspector stuff
~StreamTcp();
void show(SnortConfig*) override;
+ bool configure(SnortConfig*) override;
void tinit() override;
void tterm() override;
tcp_show(config);
}
+bool StreamTcp::configure(SnortConfig*)
+{
+ StreamSplitter::set_max(config->paf_max);
+ return true;
+}
+
void StreamTcp::tinit()
{
FlushBucket::set(config->footprint);