Fix: should always drop packet when handle UDP packet (#2659)

This commit is contained in:
yaling888
2023-04-05 14:05:23 +08:00
committed by GitHub
parent 4cd4912749
commit 95bbfe3945
2 changed files with 7 additions and 2 deletions

View File

@ -12,8 +12,6 @@ import (
)
func handleUDPToRemote(packet C.UDPPacket, pc C.PacketConn, metadata *C.Metadata) error {
defer packet.Drop()
addr := metadata.UDPAddr()
if addr == nil {
return errors.New("udp addr invalid")