From: Russ Combs Date: Fri, 28 Nov 2014 14:43:36 +0000 (-0500) Subject: remove cruft; reprioritize some H to M X-Git-Tag: 3.0.0-233~1152^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f35aea0e95d870537e1583fe463b40613c9ca792;p=thirdparty%2Fsnort3.git remove cruft; reprioritize some H to M --- diff --git a/src/main/policy.cc b/src/main/policy.cc index 01d6737d5..107b0b230 100644 --- a/src/main/policy.cc +++ b/src/main/policy.cc @@ -130,7 +130,7 @@ unsigned PolicyMap::add_shell(Shell* sh) { unsigned idx = shells.size(); shells.push_back(sh); - inspection_policy.push_back(new InspectionPolicy); // FIXIT-H need id? + inspection_policy.push_back(new InspectionPolicy); // FIXIT-M need id? ips_policy.push_back(new IpsPolicy(idx)); network_policy.push_back(new NetworkPolicy(idx)); return idx; diff --git a/src/main/snort.cc b/src/main/snort.cc index 9a45e8918..c4d274850 100644 --- a/src/main/snort.cc +++ b/src/main/snort.cc @@ -631,7 +631,7 @@ void CapturePacket() } } -static void set_policy(Packet* p) // FIXIT-H delete this? +static void set_policy(Packet* p) // FIXIT-M delete this? { set_default_policy(); p->user_policy_id = get_ips_policy()->user_policy_id; @@ -646,7 +646,7 @@ void DecodeRebuiltPacket ( p->flow = lws; - set_policy(p); // FIXIT-H rebuilt should reuse original bindings from flow + set_policy(p); // FIXIT-M rebuilt should reuse original bindings from flow SnortEventqReset(); SnortEventqPop(); @@ -693,13 +693,7 @@ DAQ_Verdict ProcessPacket( if ( !p->proto_bits ) p->proto_bits = PROTO_BIT__OTHER; -#if 0 - // FIXIT-H This should be deleted - else if ( !p->family && (p->proto_bits & PROTO_BIT__IP) ) - p->proto_bits &= ~PROTO_BIT__IP; -#endif - - set_policy(p); // FIXIT-H should not need this here + set_policy(p); // FIXIT-M should not need this here /* just throw away the packet if we are configured to ignore this port */ if ( !(p->packet_flags & PKT_IGNORE) ) @@ -830,7 +824,7 @@ DAQ_Verdict packet_callback( Active_Reset(); PacketManager::encode_reset(); - if ( flow_con ) // FIXIT-H always instantiate + if ( flow_con ) // FIXIT-M always instantiate { flow_con->timeout_flows(4, pkthdr->ts.tv_sec); } diff --git a/src/stream/tcp/tcp_session.cc b/src/stream/tcp/tcp_session.cc index 302cc9e05..c93f6fb38 100644 --- a/src/stream/tcp/tcp_session.cc +++ b/src/stream/tcp/tcp_session.cc @@ -1966,7 +1966,7 @@ static int FlushStream( const StreamBuffer* sb = nullptr; - // FIXIT-H force handling to work around nhttp + // FIXIT-M force handling to work around nhttp if ( st->flags & TF_FORCE_FLUSH ) { memcpy(flushbuf, ss->payload, bytes_to_copy); @@ -1985,7 +1985,7 @@ static int FlushStream( { s5_pkt->data = sb->data; s5_pkt->dsize = sb->length; - assert(sb->length < 65536); // FIXIT-H should be < s5_pkt->max_dsize); + assert(sb->length < 65536); // FIXIT-M should be < s5_pkt->max_dsize); // FIXIT-M flushbuf should be eliminated from this function // since we are actually using the stream splitter buffer @@ -4324,7 +4324,7 @@ static void NewTcpSessionOnSyn( /* Set the StreamTcpConfig for each direction (pkt from client) */ - tmp->client.config = dstPolicy; // FIXIT-H use external binding for both dirs + tmp->client.config = dstPolicy; // FIXIT-M use external binding for both dirs tmp->server.config = dstPolicy; // (applies to all the blocks in this funk) CopyMacAddr(p, tmp, FROM_CLIENT); @@ -4799,17 +4799,6 @@ static int ProcessTcp( } else if ( !p->dsize ) { -#if 0 - // FIXIT-H delete this? - if ( p->dsize || p->ptrs.tcph->is_syn_ack() ) - { - lwssn->session_state |= STREAM5_STATE_IGNORE; - tcpStats.sessions_ignored++; - } -#endif - //else if ( !(lwssn->session_state & STREAM5_STATE_NO_PICKUP) ) - // lwssn->session_state |= STREAM5_STATE_NO_PICKUP; - /* Do nothing. */ MODULE_PROFILE_END(s5TcpStatePerfStats); return retcode;