]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
removing random fixits that have already been fixed.
authorJosh <jrosenba@cisco.com>
Mon, 8 Dec 2014 19:13:26 +0000 (13:13 -0600)
committerJosh <jrosenba@cisco.com>
Mon, 8 Dec 2014 19:13:26 +0000 (13:13 -0600)
src/codecs/ip/cd_ipv4.cc
src/codecs/ip/cd_udp.cc
src/framework/decode_data.h
src/main/snort.cc
src/managers/codec_manager.h
src/protocols/udp.h

index 70614c386195fecf0612727c03e3af8bd8cb4bb6..ba4f6d532cd508dad3abce4cb4618865330ba55a 100644 (file)
@@ -352,8 +352,6 @@ bool Ipv4Codec::decode(const RawData& raw, CodecData& codec, DecodeData& snort)
             codec.next_prot_id = iph->proto();
     }
 
-    // FIXIT-M J  tunnel-byppas is NOT checked!!
-
     return true;
 }
 
index ec50c53b45b061c1555b2d8389aac0e39bbab53e..9658be6f857a21131d1dc8ee63f509f312d266cc 100644 (file)
@@ -74,7 +74,6 @@ static const Parameter udp_params[] =
     { "enable_gtp", Parameter::PT_BOOL, nullptr, "false",
       "decode GTP encapsulations" },
 
-    // FIXIT-L use PT_BIT_LIST
     { "gtp_ports", Parameter::PT_BIT_LIST, "65535",
       "2152 3386", "set GTP ports" },
 
index e422c0a0fc49d1879e0db3ec95b70628e8016194..6ab0bad3cf338e91024d6a42f08090cc38748ca2 100644 (file)
@@ -124,7 +124,6 @@ struct DecodeData
         ip_api.reset();
     }
 
-    // FIXIT-L J   set these types directly in Codecs
     inline void set_pkt_type(PktType pkt_type)
     { type = pkt_type; }
 
index c4d274850dbca41c078d098cbc4f0f404248a436..3072ba2dd01eafa219f2a5ac9bd457e4a589e130 100644 (file)
@@ -613,20 +613,25 @@ void set_main_hook(MainHook_f f)
 Packet* get_current_packet()
 { return s_packet; }
 
-// FIXIT-J for multiple packet threads
-// using thread locals for s_pkth and s_data won't work
-// will need array of s_packet, s_pkth, and s_data and 
-// capture all if it is not clear which thread crashed
 void CapturePacket()
 {
-    if ( s_packet && s_packet->pkth )
+    if ( snort_main_thread_pid == gettid() )
     {
-        s_pkth = *(s_packet->pkth);
-
-        if ( s_packet->pkt )
+        // FIXIT-J.  main thread crashed.  Do anything?
+    }
+    else
+    {
+        // Copy the crashed threads data.  C++11 specs ensure the
+        // thread that segfaulted will still be running.
+        if ( s_packet && s_packet->pkth )
         {
-            memcpy(s_data, s_packet->pkt, 0xFFFF & s_packet->pkth->caplen);
-            s_packet->pkt = s_data;
+            s_pkth = *(s_packet->pkth);
+
+            if ( s_packet->pkt )
+            {
+                memcpy(s_data, s_packet->pkt, 0xFFFF & s_packet->pkth->caplen);
+                s_packet->pkt = s_data;
+            }
         }
     }
 }
index 549bf2e2b5e4cdbd62d2757705820441531b38f7..f1059fc4d8ec9b3d5c2aeb94df7031327db09b6a 100644 (file)
@@ -42,8 +42,6 @@ struct ProfileStats;
 extern THREAD_LOCAL ProfileStats decodePerfStats;
 #endif
 
-// FIXIT-H J add configurable layers. configurable ipv6 extension. Move relevent
-//              decode rules into the revived DecodeModule.
 
 static const uint16_t max_protocol_id = 65535;
 
index 90aff9975b64039ddc33718bc246b5c5bf4a1610..116833ed27b129d49c883c127ef6b98f93c31e49 100644 (file)
 #include <arpa/inet.h>
 
 
-/* otherwise defined in /usr/include/ppp_defs.h */
-// FIXIT-J udph should not be set for udp tunnel
-// (only if innermost layer == udp)
-#define IsUDP(p) (IsIP(p) && !IsTCP(p) && p->ptrs.udph)
-
-
 namespace udp
 {