Page MenuHomeVyOS Platform

Show firewall partly broken in 1.3.x
Closed, ResolvedPublicBUG

Description

To reproduce:

set firewall name FOO default-action 'accept'
set firewall name FOO rule 10 action 'accept'
set firewall name FOO rule 10 destination port '22'
set firewall name FOO rule 10 protocol 'tcp'
set firewall name FOO rule 20 action 'accept'
set firewall name FOO rule 20 protocol 'icmp'
set firewall name FOO rule 30 action 'accept'
set firewall name FOO rule 30 protocol 'tcp_udp'
set firewall name FOO rule 30 source port '53'
set interfaces ethernet eth0 firewall local name 'FOO'

Show firewall

vyos@r4:~$ show firewall 

-----------------------------
Rulesets Information
-----------------------------
--------------------------------------------------------------------------------
IPv4 Firewall "FOO":

 Active on (eth0,LOCAL)

rule  action   proto     packets  bytes                                   
----  ------   -----     -------  -----                                   
10    accept   tcp       94       6324                                    
  condition - saddr 0.0.0.0/0 daddr 0.0.0.0/0 FOO-10 */                         

20    accept   icmp      0        0                                       
  condition - saddr 0.0.0.0/0 daddr 0.0.0.0/0                                   

30    accept   tcp_udp   0        0                                       
  condition - saddr 0.0.0.0/0 daddr 0.0.0.0/0 FOO-30 */                         
splice() offset past end of array at /opt/vyatta/bin/vyatta-show-firewall.pl line 356.
Use of uninitialized value in concatenation (.) or string at /opt/vyatta/bin/vyatta-show-firewall.pl line 368.
Use of uninitialized value in concatenation (.) or string at /opt/vyatta/bin/vyatta-show-firewall.pl line 369.
Use of uninitialized value $string_words_part1[3] in string at /opt/vyatta/bin/vyatta-show-firewall.pl line 400.
Use of uninitialized value $string_words_part1[0] in string at /opt/vyatta/bin/vyatta-show-firewall.pl line 400.
Use of uninitialized value $string_words_part1[1] in string at /opt/vyatta/bin/vyatta-show-firewall.pl line 400.

10000 accept                                                              
  condition - saddr  daddr                                                      

vyos@r4:~$

It happens after this commit 9b750c11
In T4100

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.3-stable-202202080442
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Related Objects

Event Timeline

Viacheslav renamed this task from Show firewall partly broken to Show firewall partly broken in 1.3.x.Feb 8 2022, 5:05 PM
Viacheslav changed the task status from Open to Confirmed.
Viacheslav updated the task description. (Show Details)
Viacheslav updated the task description. (Show Details)
Viacheslav changed the task status from Confirmed to Needs testing.Feb 10 2022, 3:19 PM
Viacheslav assigned this task to Unknown Object (User).
Unknown Object (User) added a comment.Feb 11 2022, 1:10 AM

Checked in VyOS 1.3-stable-202202101926

vyos@vyos:~$ sh firewall name FOO

-----------------------------
Rulesets Information
-----------------------------

IPv4 Firewall "FOO":

 Active on (eth0,LOCAL)

rule  action   proto     packets  bytes
----  ------   -----     -------  -----
10    accept   tcp       91       5096
  condition - saddr 0.0.0.0/0 daddr 0.0.0.0/0 FOO-10 */

20    accept   icmp      0        0
  condition - saddr 0.0.0.0/0 daddr 0.0.0.0/0

30    accept   tcp_udp   0        0
  condition - saddr 0.0.0.0/0 daddr 0.0.0.0/0 FOO-30 */

1000000 accept   all       0        0
  condition - saddr 0.0.0.0/0 daddr 0.0.0.0/0
dmbaturin changed Issue type from Unspecified (please specify) to Bug (incorrect behavior).Mar 21 2022, 11:57 AM