]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Fixed warnings due to protocol update.
authorSteve Chew <stechew@cisco.com>
Tue, 26 Apr 2016 17:36:03 +0000 (13:36 -0400)
committerSteve Chew <stechew@cisco.com>
Tue, 26 Apr 2016 17:36:03 +0000 (13:36 -0400)
src/loggers/alert_syslog.cc
src/managers/codec_manager.cc
src/stream/ip/ip_defrag.cc
tools/u2spewfoo/u2spewfoo.cc

index b4ec54e58f7c32be3fda008d840a82251ebd24e9..6787f8e8765809d3f5ac6e6bbfe2d4366bcd2ae5 100644 (file)
@@ -251,7 +251,7 @@ static void AlertSyslog(
         else
         {
             SnortSnprintfAppend(event_string, sizeof(event_string),
-                "{%d} ", ip_proto);
+                "{%d} ", to_utype(ip_proto));
         }
 
         if ((p->ptrs.decode_flags & DECODE_FRAG)
index 09c6eda48bf63324ecc59edea8d9c63f20720e2f..247a6f5bdc4094290e30a5420396f2d21d551c63 100644 (file)
@@ -168,7 +168,7 @@ void CodecManager::instantiate(CodecApiWrapper& wrap, Module* m, SnortConfig*)
                 ParseError("The Codecs %s and %s have both been registered "
                     "for protocol_id %d. Codec %s will be used\n",
                     s_protocols[s_proto_map[to_utype(id)]]->get_name(), cd->get_name(),
-                    id, cd->get_name());
+                    to_utype(id), cd->get_name());
 
             s_proto_map[to_utype(id)] = (decltype(s_proto_map[to_utype(id)]))codec_id; // future proofing
         }
index 68acfffdc88a4e0a8c55a320b32c15215c04f3af..6b39689a8394e5243a27450d8ab62576c0db25c7 100644 (file)
@@ -872,7 +872,6 @@ static void FragRebuild(FragTracker* ft, Packet* p)
         {
             ip::IP6Hdr* const rawHdr =
                 const_cast<ip::IP6Hdr*>(dpkt->ptrs.ip_api.get_ip6h());
-                const_cast<ip::IP6Hdr*>(dpkt->ptrs.ip_api.get_ip6h());
             rawHdr->ip6_next = ft->ip_proto;
         }
         else
index d19ba08095753ec84b0bdbe8208b063c833b06f8..0cbe82bc0d156fe921048e1885379017caf86963 100644 (file)
@@ -326,7 +326,7 @@ static void event_dump(u2record* record)
         event.signature_revision, event.classification_id,
         event.priority_id, TO_IP(event.ip_source),
         TO_IP(event.ip_destination), event.sport_itype,
-        event.dport_icode, event.ip_proto,
+        event.dport_icode, to_utype(event.ip_proto),
         event.impact_flag, event.blocked);
 }
 
@@ -372,7 +372,7 @@ static void event6_dump(u2record* record)
     printf("ip destination: %s\n"
         "\tsrc port: %hu\tdest port: %hu\tip_proto: %hhu\timpact_flag: %hhu\tblocked: %hhu\n",
         ip6buf, event.sport_itype,
-        event.dport_icode, event.ip_proto,
+        event.dport_icode, to_utype(event.ip_proto),
         event.impact_flag, event.blocked);
 }
 
@@ -420,7 +420,7 @@ static void event2_dump(u2record* record)
         event.signature_revision, event.classification_id,
         event.priority_id, TO_IP(event.ip_source),
         TO_IP(event.ip_destination), event.sport_itype,
-        event.dport_icode, event.ip_proto,
+        event.dport_icode, to_utype(event.ip_proto),
         event.impact_flag, event.blocked,
         event.mpls_label, event.vlanId, event.pad2);
 }
@@ -476,7 +476,7 @@ static void event2_6_dump(u2record* record)
         "\tsrc port: %hu\tdest port: %hu\tip_proto: %hhu\timpact_flag: %hhu\tblocked: %hhu\n"
         "\tmpls label: %u\tvland id: %hu\tpolicy id: %hu\n",
         ip6buf, event.sport_itype,
-        event.dport_icode, event.ip_proto,
+        event.dport_icode, to_utype(event.ip_proto),
         event.impact_flag, event.blocked,
         event.mpls_label, event.vlanId,event.pad2);
 }