public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Matthias Fischer <matthias.fischer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: Testing 'rules.pl'
Date: Sun, 12 Mar 2023 13:52:14 +0100	[thread overview]
Message-ID: <6ea9ecbe-b1af-e535-a99e-b504f709fbb3@ipfire.org> (raw)
In-Reply-To: <e6c5dd9e-fd81-7a7d-091c-6fd29263c62e@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 2436 bytes --]

Hi,

I took a closer look and as I see it, there is a single bracket missing
in line 764, see:

=>
https://git.ipfire.org/?p=ipfire-2.x.git;a=blob;f=config/firewall/rules.pl;h=80985ca530ec68e8191334125f18649f7f5eb429;hb=1b70ead36dfaf6541677e4ac5d05867273eaa265#l764

Now:
...
if($blocklistsettings{'LOGGING'}) && ($blocklistsettings{'LOGGING'} eq
"on")) {
...

It should read:
...
if(($blocklistsettings{'LOGGING'}) && ($blocklistsettings{'LOGGING'} eq
"on")) {
...

I added this bracket and errors are gone.

Can anyone confirm?

Best,
Matthias

On 12.03.2023 10:45, Matthias Fischer wrote:
> Hi,
> 
> Being curious, I tested
> https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=1b70ead36dfaf6541677e4ac5d05867273eaa265
> on Core 173 today => "firewall: Silence warnings if blocklist logging is
> not set".
> 
> Bug-Reference: #12979.
> 
> But when I try to restart the firewall, I get:
> 
> ...
> 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.
> ...
> 
> The old version of 'rules.pl' is working without problems.
> 
> Am I doing something wrong or is there anything still missing!?
> 
> Best,
> Matthias


  reply	other threads:[~2023-03-12 12:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-12  9:45 Matthias Fischer
2023-03-12 12:52 ` Matthias Fischer [this message]
2023-03-13 14:09   ` Michael Tremer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ea9ecbe-b1af-e535-a99e-b504f709fbb3@ipfire.org \
    --to=matthias.fischer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox