mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-07 21:19:03 +02:00
Dont check the subnet because we dont use it
This commit is contained in:
@@ -268,7 +268,11 @@ export async function createSite(
|
|||||||
|
|
||||||
let newSite: Site | undefined;
|
let newSite: Site | undefined;
|
||||||
try {
|
try {
|
||||||
if (subnet && exitNodeId) {
|
if (type === "wireguard" && subnet && exitNodeId) {
|
||||||
|
// Only wireguard sites actually persist the provided subnet/exitNodeId.
|
||||||
|
// Newt sites have their subnet/exit node chosen (under a lock) when the
|
||||||
|
// newt connects, so validating them here is both unnecessary and racy,
|
||||||
|
// since pickSiteDefaults does not lock the subnet it suggests.
|
||||||
//make sure the subnet is in the range of the exit node if provided
|
//make sure the subnet is in the range of the exit node if provided
|
||||||
const [exitNode] = await db
|
const [exitNode] = await db
|
||||||
.select()
|
.select()
|
||||||
|
|||||||
Reference in New Issue
Block a user