From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: development@lists.ipfire.org Subject: Re: Testing 'rules.pl' Date: Mon, 13 Mar 2023 14:09:44 +0000 Message-ID: In-Reply-To: <6ea9ecbe-b1af-e535-a99e-b504f709fbb3@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2402112493933552976==" List-Id: --===============2402112493933552976== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, I can confirm that this is indeed a syntax error. How this compiles I have no= idea. Please send a patch. Also thank you very much for looking into this! -Michael > On 12 Mar 2023, at 12:52, Matthias Fischer = wrote: >=20 > Hi, >=20 > I took a closer look and as I see it, there is a single bracket missing > in line 764, see: >=20 > =3D> > https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dblob;f=3Dconfig/firewall/rul= es.pl;h=3D80985ca530ec68e8191334125f18649f7f5eb429;hb=3D1b70ead36dfaf6541677e= 4ac5d05867273eaa265#l764 >=20 > Now: > ... > if($blocklistsettings{'LOGGING'}) && ($blocklistsettings{'LOGGING'} eq > "on")) { > ... >=20 > It should read: > ... > if(($blocklistsettings{'LOGGING'}) && ($blocklistsettings{'LOGGING'} eq > "on")) { > ... >=20 > I added this bracket and errors are gone. >=20 > Can anyone confirm? >=20 > Best, > Matthias >=20 > On 12.03.2023 10:45, Matthias Fischer wrote: >> Hi, >>=20 >> Being curious, I tested >> https://git.ipfire.org/?p=3Dipfire-2.x.git;a=3Dcommitdiff;h=3D1b70ead36dfa= f6541677e4ac5d05867273eaa265 >> on Core 173 today =3D> "firewall: Silence warnings if blocklist logging is >> not set". >>=20 >> Bug-Reference: #12979. >>=20 >> But when I try to restart the firewall, I get: >>=20 >> ... >> root(a)ipfire: /usr/lib/firewall # /etc/init.d/firewall restart >> Setting up firewall >> syntax error at /usr/lib/firewall/rules.pl line 764, near ") &&" >> Global symbol "$blocklist" requires explicit package name (did you >> forget to declare "my $blocklist"?) at /usr/lib/firewall/rules.pl line 770. >> Global symbol "$blocklist" requires explicit package name (did you >> forget to declare "my $blocklist"?) at /usr/lib/firewall/rules.pl line 773. >> Global symbol "$blocklist" requires explicit package name (did you >> forget to declare "my $blocklist"?) at /usr/lib/firewall/rules.pl line 773. >> Global symbol "$blocklist" requires explicit package name (did you >> forget to declare "my $blocklist"?) at /usr/lib/firewall/rules.pl line 774. >> Global symbol "$blocklist" requires explicit package name (did you >> forget to declare "my $blocklist"?) at /usr/lib/firewall/rules.pl line 774. >> syntax error at /usr/lib/firewall/rules.pl line 777, near "} else" >> Global symbol "$blocklist" requires explicit package name (did you >> forget to declare "my $blocklist"?) at /usr/lib/firewall/rules.pl line 784. >> syntax error at /usr/lib/firewall/rules.pl line 785, near "}" >> Can't redeclare "my" in "my" at /usr/lib/firewall/rules.pl line 792, >> near "my" >> /usr/lib/firewall/rules.pl has too many errors. >> ... >>=20 >> The old version of 'rules.pl' is working without problems. >>=20 >> Am I doing something wrong or is there anything still missing!? >>=20 >> Best, >> Matthias >=20 --===============2402112493933552976==--