]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
minor tweak. removing false assertion in packet_manager
authorJosh <jrosenba@cisco.com>
Tue, 16 Sep 2014 19:18:09 +0000 (15:18 -0400)
committerJosh <jrosenba@cisco.com>
Tue, 16 Sep 2014 19:18:13 +0000 (15:18 -0400)
src/framework/codec.h
src/protocols/ip.h
src/protocols/packet_manager.cc

index e34fb6b427af6dbd0e5fde5c2a2594640396bed3..b185f1e9a543f44032a74590467f8ee8daf7bd45 100644 (file)
@@ -63,11 +63,11 @@ namespace icmp
 enum EncodeType{
     ENC_TCP_FIN,
     ENC_TCP_RST,
+    ENC_TCP_PUSH,
     ENC_UNR_NET,
     ENC_UNR_HOST,
     ENC_UNR_PORT,
     ENC_UNR_FW,
-    ENC_TCP_PUSH,
     ENC_MAX
 };
 
@@ -162,7 +162,7 @@ constexpr uint8_t PKT_TYPE__TCP = 0x02;
 constexpr uint8_t PKT_TYPE__UDP = 0x04;
 constexpr uint8_t PKT_TYPE__ICMP4 = 0x08;
 constexpr uint8_t PKT_TYPE__ICMP6 = 0x10;
-constexpr uint8_t PKT_TYPE__ARP = 0x10;
+constexpr uint8_t PKT_TYPE__ARP = 0x20;
 
 struct SnortData
 {
@@ -186,7 +186,7 @@ struct SnortData
     inline void reset()
     {
         static_assert(PKT_TYPE__UNKOWN == 0, "PKT_TYPE__UNKOWN must be zero!!");
-        memset((char*)tcph, '\0', offsetof(SnortData, ip_api));
+        memset((char*)&tcph, '\0', offsetof(SnortData, ip_api));
         ip_api.reset();
     }
 };
index f04859054b8b749dc40c5124e5a82f6c3e5045b6..0cfbb969e7d81cdc022c4dfbde786ee41d42120a 100644 (file)
@@ -55,6 +55,7 @@ class SO_PUBLIC IpApi
 public:
 //    IpApi();   constructor and destructor MUST remain a trivial. Adding
 //    ~IpApi();  any non-trivial code will cause a compilation failure.
+    IpApi() = default ;
 
     void set(const IP4Hdr* h4);
     void set(const IP6Hdr* h6);
index ba13bd3159ed545f1b84faed5a48332149879aaa..deba3d58281b0c45ccec285aa3657102066dade0 100644 (file)
@@ -148,7 +148,7 @@ void PacketManager::decode(
     uint16_t prev_prot_id = FINISHED_DECODE;
 
 
-    assert(!(p->packet_flags & PKT_REBUILT_STREAM));
+//    assert(!(p->packet_flags & PKT_REBUILT_STREAM));
 
 
     // initialize all Packet information