mirror of
https://github.com/denoland/std.git
synced 2024-11-21 20:50:22 +00:00
fix(net): skip empty mac address for getNetworkAddress()
(#5941)
fix(net) skip empty mac address
This commit is contained in:
parent
8d7e184943
commit
6ba3810544
@ -39,6 +39,7 @@ export function getNetworkAddress(
|
||||
return Deno.networkInterfaces()
|
||||
.find((i) =>
|
||||
i.family === family &&
|
||||
i.mac !== "00:00:00:00:00:00" &&
|
||||
(family === "IPv4"
|
||||
// Cannot lie within 127.0.0.0/8
|
||||
? !i.address.startsWith("127")
|
||||
|
Loading…
Reference in New Issue
Block a user