Skip to content

Commit

Permalink
Do not send nil packets for unhandled L4 protocols
Browse files Browse the repository at this point in the history
  • Loading branch information
NamelessOne91 committed Aug 5, 2024
1 parent 30b8968 commit 0932b59
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sockets/raw_socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ func handleLayer4Protocol(protocol string, packet protocols.IPPacket, dataChan c
np, err = protocols.UDPPacketFromIPPacket(packet)
case "tcp":
np, err = protocols.TCPPacketFromIPPacket(packet)
default:
// TODO: maybe support more protocols
return
}

if err != nil {
Expand Down

0 comments on commit 0932b59

Please sign in to comment.