mirror of
https://github.com/slackhq/nebula.git
synced 2026-11-15 18:06:52 +01:00
checkpt
This commit is contained in:
1 parent
027c728702
commit
e99e48cca7
7 files changed
+83
-77
No files matched your search
@@ -39,6 +39,16 @@ const (
|
||||
ICMPv6TypeEchoReply = 129
|
||||
)
|
||||
|
||||
// HasPorts reports whether packets of proto carry port numbers that the packet parsers read: TCP, UDP, UDPLite,
|
||||
// DCCP, and SCTP. Firewall rules with a port or a port range only apply to these protocols.
|
||||
func HasPorts(proto uint8) bool {
|
||||
switch proto {
|
||||
case IPProtocolTCP, IPProtocolUDP, IPProtocolUDPLite, IPProtocolDCCP, IPProtocolSCTP:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func CreateRejectPacket(packet []byte, out []byte) []byte {
|
||||
if len(packet) < 1 {
|
||||
return nil
|
||||
|
||||
Reference in new issue
Block a user