From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: [PATCH] modified proxy.cgi to make it possible that all subnets declared in "network access control" will be translated from cidr to subnet notation in proxy.pac Date: Sat, 17 Oct 2020 13:23:18 +0100 Message-ID: In-Reply-To: <20201016080852.1222419-1-steffen.klammer@staderschulen.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4641174727777390047==" List-Id: --===============4641174727777390047== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, Thank you very much for submitting your patch. This looks good to me. Has anyone tried this and can confirm that it works as= intended? What would be added if the net mask was invalid? Let=E2=80=99s say if someone= writes 192.168.0.0/38? Reviewed-by: Michael Tremer Best, -Michael > On 16 Oct 2020, at 09:08, steffen.klammer(a)staderschulen.de wrote: >=20 > From: Steffen Klammer >=20 > --- > html/cgi-bin/proxy.cgi | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) >=20 > diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi > index fdf9bddaf..a63e1c2df 100644 > --- a/html/cgi-bin/proxy.cgi > +++ b/html/cgi-bin/proxy.cgi > @@ -3004,7 +3004,8 @@ END > ) > { > chomp $temp[1]; > - print FILE " ||\n (isInNet(myIpAddress(), \"$temp[0]\", \"$temp[1= ]\"))"; > + my $tempmask =3D &Network::convert_prefix2netmask($temp[1]); > + print FILE " ||\n (isInNet(myIpAddress(), \"$temp[0]\", \"$tempma= sk\"))"; > } > } >=20 > --=20 > 2.25.1 >=20 --===============4641174727777390047==--