-- pulled latest from tom
-- added paramaters to doc reference section
-- flow state updates
+-- ip defrag fixes
125
-- discovered can't catch exceptions thrown from Lua to C++; need to
/* if this packet isn't a fragment
* or if it is, its a UDP packet and offset is 0 */
- if(!(snort.decode_flags & DECODE_FRAG) ||
- ((frag_off == 0) &&
- (iph->get_proto() == IPPROTO_UDP)))
+ if(!(snort.decode_flags & DECODE_FRAG) /*||
+ ((frag_off == 0) && // FIXIT-M this forces flow to udp instead of ip
+ (iph->get_proto() == IPPROTO_UDP))*/)
{
if (iph->get_proto() >= MIN_UNASSIGNED_IP_PROTO)
codec_events::decoder_event(codec, DECODE_IP_UNASSIGNED_PROTO);
ft->protocol = p->ptrs.ip_api.get_ip4h()->get_proto();
const ip::IP4Hdr *ip4h = reinterpret_cast<const ip::IP4Hdr*>(lyr.start);
- frag_off = ntohs(ip4h->get_off());
+ frag_off = ntohs(ip4h->get_off()) & 0x1FFF;
}
else /* IPv6 */
{
/*
* Check the FragTracker that was passed in first
*/
- if(CheckTimeout(
- pkttime,
- &(ft)->frag_time,
- fe) == FRAG_TIMEOUT)
+ if(CheckTimeout(pkttime, &(ft)->frag_time, fe) == FRAG_TIMEOUT)
{
/*
* Oops, we've timed out, whack the FragTracker
",iny fragment"
FragEngine::FragEngine()
-{ memset(this, 0, sizeof(*this)); }
+{
+ memset(this, 0, sizeof(*this));
+ frag_timeout = 60;
+}
//-------------------------------------------------------------------------
// stream_ip module
StreamIpConfig::StreamIpConfig()
{
- session_timeout = 30;
+ session_timeout = 60;
}
static void ip_show (StreamIpConfig* pc)