Hi,
Being curious, I tested https://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff;h=1b70ead36dfaf6541677... 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@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
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...
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=1b70ead36dfaf6541677... 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@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
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 matthias.fischer@ipfire.org wrote:
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...
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=1b70ead36dfaf6541677... 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@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