Skip to content

Commit 92d175c

Browse files
committed
Fix wireguard crash
1 parent ca90727 commit 92d175c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

transport/wireguard/endpoint.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ func (e *Endpoint) Close() error {
223223
}
224224

225225
func (e *Endpoint) Lookup(address netip.Addr) *device.Peer {
226+
if e.allowedIPs == nil {
227+
return nil
228+
}
226229
return e.allowedIPs.Lookup(address.AsSlice())
227230
}
228231

0 commit comments

Comments
 (0)