ACL access fix
gitea/docker-discover/pipeline/head This commit looks good
Details
gitea/docker-discover/pipeline/head This commit looks good
Details
This commit is contained in:
parent
bc26c5a805
commit
4860007a50
|
@ -34,6 +34,10 @@ acls:
|
||||||
ips:
|
ips:
|
||||||
- 10.5.1.0/24
|
- 10.5.1.0/24
|
||||||
zones: all
|
zones: all
|
||||||
|
dmz:
|
||||||
|
ips:
|
||||||
|
- 10.0.0.0/16
|
||||||
|
zones: all
|
||||||
defaults:
|
defaults:
|
||||||
https: true
|
https: true
|
||||||
zone: public
|
zone: public
|
||||||
|
|
2
index.js
2
index.js
|
@ -256,7 +256,7 @@ async function updateProxy(firstRun) {
|
||||||
let match = false;
|
let match = false;
|
||||||
for (const bNet of bAcl.ips) {
|
for (const bNet of bAcl.ips) {
|
||||||
match = bNet.mask === 0;
|
match = bNet.mask === 0;
|
||||||
if (bNet.mask > 0) {
|
if (bNet.mask > 0 && bNet.mask <= aNet.mask) {
|
||||||
const netMask = (~0) << (32 - bNet.mask);
|
const netMask = (~0) << (32 - bNet.mask);
|
||||||
const aSubnet = aNet.ip & netMask;
|
const aSubnet = aNet.ip & netMask;
|
||||||
const bSubnet = bNet.ip & netMask;
|
const bSubnet = bNet.ip & netMask;
|
||||||
|
|
Reference in New Issue