]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
Merge pull request #2969 in SNORT/snort3 from ~MDAGON/snort3:unreachable to master
authorTom Peters (thopeter) <thopeter@cisco.com>
Thu, 8 Jul 2021 20:32:06 +0000 (20:32 +0000)
committerTom Peters (thopeter) <thopeter@cisco.com>
Thu, 8 Jul 2021 20:32:06 +0000 (20:32 +0000)
Squashed commit of the following:

commit a9a7be092a4d4a97fd53dc562e7b27c48ba0d7c6
Author: Maya Dagon <mdagon@cisco.com>
Date:   Tue Jul 6 12:10:50 2021 -0400

    packet_io: unreachable packets shouldn't be sent for ICMP

src/packet_io/active.cc

index a7528e700da2390b41ceb51faca2c3fab01a5f03..53d33aee0a330295fa5e468871b23d84d271bfed 100644 (file)
@@ -498,21 +498,9 @@ bool Active::is_reset_candidate(const Packet* p)
 
 bool Active::is_unreachable_candidate(const Packet* p)
 {
-    // FIXIT-L allow unr to tcp/udp/icmp4/icmp6 only or for all
-    switch ( p->type() )
-    {
-    case PktType::TCP:
-    case PktType::UDP:
-        return true;
-
-    case PktType::ICMP:
-        // FIXIT-L return false for icmp unreachables
+    if ( p->type() == PktType::TCP || p->type() == PktType::UDP)
         return true;
 
-    default:
-        break;
-    }
-
     return false;
 }