Never allow permanent verdicts for ICMP connections

This commit is contained in:
Daniel
2024-04-10 14:10:34 +02:00
parent 5215e41624
commit 0cff5a33f2
2 changed files with 16 additions and 2 deletions

View File

@@ -73,3 +73,14 @@ func IsStreamProtocol(protocol uint8) bool {
return false
}
}
// IsICMP returns whether the given protocol is ICMP or ICMPv6.
func IsICMP(protocol uint8) bool {
switch protocol {
case 1, // ICMP
58: // ICMP6
return true
default:
return false
}
}