Bläddra i källkod

fix IPv6 issue WORKAROUND

handle IPv6 PDUs like Unrecognized PDUs
increase DB_VERSION
Jens Keim 6 år sedan
förälder
incheckning
7a82f71d58
2 ändrade filer med 5 tillägg och 3 borttagningar
  1. 4 2
      code_boost/src/cxx/pcap_processor.cpp
  2. 1 1
      code_boost/src/cxx/statistics_db.h

+ 4 - 2
code_boost/src/cxx/pcap_processor.cpp

@@ -242,7 +242,9 @@ void pcap_processor::process_packets(const Packet &pkt) {
         stats.assignMacAddress(ipAddressReceiver, macAddressReceiver);
 
     } // PDU is IPv6
-    else if (pdu_l3_type == PDU::PDUType::IPv6) {
+    // FIXME: IPv6 Workaround
+    /*else if (pdu_l3_type == PDU::PDUType::IPv6) {
+        return;
         const IPv6 &ipLayer = (const IPv6 &) *pdu_l3;
         ipAddressSender = ipLayer.src_addr().to_string();
         ipAddressReceiver = ipLayer.dst_addr().to_string();
@@ -260,7 +262,7 @@ void pcap_processor::process_packets(const Packet &pkt) {
         // Assign IP Address to MAC Address
         stats.assignMacAddress(ipAddressSender, macAddressSender);
         stats.assignMacAddress(ipAddressReceiver, macAddressReceiver);
-    } //PDU is unrecognized
+    }*/ //PDU is unrecognized
     else {
         hasUnrecognized = true;
 

+ 1 - 1
code_boost/src/cxx/statistics_db.h

@@ -22,7 +22,7 @@ public:
     /*
      * Database version: Increment number on every change in the C++ code!
      */
-    static const int DB_VERSION = 7;
+    static const int DB_VERSION = 8;
 
     /*
      * Methods for writing values into database