Fix wireguard crash

This commit is contained in:
世界 2025-08-19 23:13:47 +08:00
parent eb09af768c
commit 31fca03ef5
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -223,6 +223,9 @@ func (e *Endpoint) Close() error {
}
func (e *Endpoint) Lookup(address netip.Addr) *device.Peer {
if e.allowedIPs == nil {
return nil
}
return e.allowedIPs.Lookup(address.AsSlice())
}