The command "show log firewall name <name>" does not show the expected log entries
Closed, ResolvedPublic


I think the expected behavior of the command show log firewall name <name> is, that it shows any log entries created by the default-action and created by the rules of the specific firewall.
Instead the command shows the default-action log entries of all firewalls that have set enable-default-log.
It seems that the regular expression is not correct.

diff --git a/templates/show/log/firewall/name/node.tag/node.def b/templates/show/log/firewall/name/node.tag/node.def
index 4e71fa0..7431f8a 100644
--- a/templates/show/log/firewall/name/node.tag/node.def
+++ b/templates/show/log/firewall/name/node.tag/node.def
@@ -1,5 +1,5 @@
 help: Show log for a specified firewall
 allowed: local -a ARR=$(cli-shell-api -- listEffectiveNodes firewall name)
           echo "${ARR[@]//\'/}"
-run: cat $(printf "%s\n" /var/log/messages* | sort -nr ) | egrep "\[$5-[0-9]+|default-[ADR]\]"
+run: cat $(printf "%s\n" /var/log/messages* | sort -nr ) | egrep "\[$5-([0-9]+|default)-[ADR]\]"


Difficulty level
Easy (less than an hour)
Why the issue appeared?
Implementation mistake
sepo created this task.May 26 2017, 7:54 AM

@sepo please assign task to me

sepo assigned this task to syncer.Jul 25 2017, 8:40 AM

could you please confirm if it is working for you in the latest buid (starting from 26 juli)

syncer moved this task from Need Triage to Backlog on the VyOS 1.1.x board.
syncer edited subscribers, added: Maintainers; removed: syncer, UnicronNL.

@UnicronNL can we fix this for 1.1.8 too?

syncer triaged this task as Normal priority.Aug 1 2017, 2:42 AM
syncer moved this task from Need Triage to Backlog on the VyOS 1.2.x board.
syncer reassigned this task from syncer to UnicronNL.
syncer added a subscriber: syncer.

Moved to backlog and assigned to you

syncer moved this task from Needs Triage to Backlog on the VyOS 1.1.x (1.1.8) board.

Added to 1.1.8 backlog

UnicronNL moved this task from Backlog to Finished on the VyOS 1.1.x (1.1.8) board.Sep 6 2017, 8:07 AM
UnicronNL closed this task as Resolved.

falso fixed in 1.1.8