]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
remove cruft; reprioritize some H to M
authorRuss Combs <rucombs@cisco.com>
Fri, 28 Nov 2014 14:43:36 +0000 (09:43 -0500)
committerRuss Combs <rucombs@cisco.com>
Fri, 28 Nov 2014 14:43:36 +0000 (09:43 -0500)
src/main/policy.cc
src/main/snort.cc
src/stream/tcp/tcp_session.cc

index 01d6737d5392df765043c50c38d3fb14f2f9f60e..107b0b2302c2fe4ca064fd207521ecd2ecb12e6c 100644 (file)
@@ -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;
index 9a45e8918f3dd86bb89ad7158b3764c4a0dd953f..c4d274850dbca41c078d098cbc4f0f404248a436 100644 (file)
@@ -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);
     }
index 302cc9e05319e5d038b91d76711383fe179c38d8..c93f6fb38f39757382fa646c6d972411e0c8961d 100644 (file)
@@ -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;