mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-08-22 01:57:36 +08:00
Fix wireguard crash
This commit is contained in:
parent
30903e19fa
commit
6ede2d9ea7
@ -223,6 +223,9 @@ func (e *Endpoint) Close() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *Endpoint) Lookup(address netip.Addr) *device.Peer {
|
func (e *Endpoint) Lookup(address netip.Addr) *device.Peer {
|
||||||
|
if e.allowedIPs == nil {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return e.allowedIPs.Lookup(address.AsSlice())
|
return e.allowedIPs.Lookup(address.AsSlice())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user