mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
fix parsing bare IPs
This commit is contained in:
parent
b888ff931d
commit
dc79244f5b
1 changed files with 2 additions and 1 deletions
|
@ -202,7 +202,8 @@ function parseIpOrMask(ipOrMask: string): CIDR | null {
|
||||||
return ipaddr.parseCIDR(ipOrMask);
|
return ipaddr.parseCIDR(ipOrMask);
|
||||||
}
|
}
|
||||||
if (ipaddr.isValid(ipOrMask)) {
|
if (ipaddr.isValid(ipOrMask)) {
|
||||||
return ipaddr.parseCIDR(ipOrMask);
|
const ip = ipaddr.parse(ipOrMask);
|
||||||
|
return [ip, 32];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue