diff options
author | Gaurav <gaurav.sinha@vyatta.com> | 2012-02-29 13:44:55 -0800 |
---|---|---|
committer | Gaurav <gaurav.sinha@vyatta.com> | 2012-02-29 13:44:55 -0800 |
commit | 0e828626b8c8fcbfcbffe105ef61aca3b9818e0d (patch) | |
tree | d2271205145d873933cfe36217b4fc381e925995 /lib | |
parent | 2ddf45aff7672525f66bbf2e642b85cbca25b0a3 (diff) | |
download | vyatta-cfg-firewall-0e828626b8c8fcbfcbffe105ef61aca3b9818e0d.tar.gz vyatta-cfg-firewall-0e828626b8c8fcbfcbffe105ef61aca3b9818e0d.zip |
fixing 7047
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/IpTables/Rule.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Vyatta/IpTables/Rule.pm b/lib/Vyatta/IpTables/Rule.pm index d3c11e0..72bd536 100755 --- a/lib/Vyatta/IpTables/Rule.pm +++ b/lib/Vyatta/IpTables/Rule.pm @@ -300,8 +300,12 @@ sub get_log_prefix { # want to include "[$chain-$rule_num-$action] " but that would require # 1 29 1 4 1 1 11 = 39 # so truncate the chain name so that it'll all fit. - $chain = substr($chain, 0, 19) if length($chain) > 19; my $action_char = uc(substr($action, 0, 1)); + if ( length($chain) > 19 ) { + $chain = substr($chain, 0, 19); + printf STDERR 'Firewall config warning: ' + . "rule $rule_num logging prefix will be truncated to [$chain-$rule_num-$action_char]\n"; + } my $log_prefix = "[$chain-$rule_num-$action_char] "; return $log_prefix; } |