in src/logic/IPUtils.js [82:93]
static findLargestMask(currentIp, endIp) {
const remaining = endIp - currentIp;
let currentBits = 0;
while (currentBits < 32) {
const ips = 2**currentBits;
if (remaining <= ips) {
return 32 - currentBits;
}
currentBits ++;
}
return NaN; // ???
}