mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-28 06:34:50 +02:00
Handle cidrs correctly
This commit is contained in:
parent
db0328fa71
commit
d664aa204f
4 changed files with 34 additions and 14 deletions
|
@ -274,13 +274,4 @@ export async function getNextAvailableOrgSubnet(): Promise<string> {
|
|||
}
|
||||
|
||||
return subnet;
|
||||
}
|
||||
|
||||
export function isValidCidr(cidr: string): boolean {
|
||||
try {
|
||||
cidrToRange(cidr);
|
||||
return true;
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue