Skip to content

Commit

Permalink
Fix: udp crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamacro committed Dec 31, 2019
1 parent 38458cc commit 50704ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tunnel/tunnel.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func (t *Tunnel) handleUDPConn(packet *inbound.PacketAdapter) {
lockKey := key + "-lock"
wg, loaded := t.natTable.GetOrCreateLock(lockKey)

isFakeIP := dns.DefaultResolver.IsFakeIP(metadata.DstIP)
isFakeIP := dns.DefaultResolver != nil && dns.DefaultResolver.IsFakeIP(metadata.DstIP)

go func() {
if !loaded {
Expand Down

0 comments on commit 50704ea

Please sign in to comment.