From: rcombs Date: Tue, 28 Oct 2014 18:08:49 +0000 (-0400) Subject: patched around pkt type vs ipproto issue X-Git-Tag: 3.0.0-233~1315^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a46df4863bac3416e76d7461a24f91cf8e5666a;p=thirdparty%2Fsnort3.git patched around pkt type vs ipproto issue --- diff --git a/ChangeLog b/ChangeLog index 11ec50011..999696cd1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -35,6 +35,7 @@ -- pulled in HI defaults patch from Bhagya -- refactored inspector groups -- moved normal_mask out of flow into inspector policy +-- patched around flow key issue with icmp ipproto vs pkt type 125 -- discovered can't catch exceptions thrown from Lua to C++; need to diff --git a/src/flow/flow_control.cc b/src/flow/flow_control.cc index 5b1da20e0..6e03e8cdc 100644 --- a/src/flow/flow_control.cc +++ b/src/flow/flow_control.cc @@ -248,10 +248,11 @@ void FlowControl::set_key(FlowKey* key, Packet* p) key->init(ip_api.get_src(), ip_api.get_dst(), ip_api.id(), proto, vlanId, mplsId, addressSpaceId); } - else if (proto == IPPROTO_ICMP) + // FIXIT-H-J segfault because p->ptrs.icmph is null + // shold be checking pkt type instead of ipproto? + //else if (proto == IPPROTO_ICMP) + else if ( p->ptrs.icmph ) { - // FIXIT-H-J segfault because p->ptrs.icmph is null - // shold be checking pkt type instead of ipproto? key->init(ip_api.get_src(), p->ptrs.icmph->type, ip_api.get_dst(), 0, proto, vlanId, mplsId, addressSpaceId); }