summaryrefslogtreecommitdiff
path: root/lib/Vyatta/SrcNatRule.pm
diff options
context:
space:
mode:
authorDaniil Baturin <daniil.baturin@vyatta.com>2011-12-08 21:27:51 +0700
committerDaniil Baturin <daniil.baturin@vyatta.com>2011-12-08 21:27:51 +0700
commitabb2ff29469d4b05fde36654ed6d5f584867183f (patch)
tree3d4d3627785b7554c27ffb494db23156c212a2d2 /lib/Vyatta/SrcNatRule.pm
parent48368cf6bd0678e25313f7259f80e0a82a688706 (diff)
downloadvyatta-nat-abb2ff29469d4b05fde36654ed6d5f584867183f.tar.gz
vyatta-nat-abb2ff29469d4b05fde36654ed6d5f584867183f.zip
Update log prefixes to match new design spec.
Diffstat (limited to 'lib/Vyatta/SrcNatRule.pm')
-rw-r--r--lib/Vyatta/SrcNatRule.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Vyatta/SrcNatRule.pm b/lib/Vyatta/SrcNatRule.pm
index 8579eba..bdfe199 100644
--- a/lib/Vyatta/SrcNatRule.pm
+++ b/lib/Vyatta/SrcNatRule.pm
@@ -142,6 +142,7 @@ sub rule_str {
my $can_use_port = 1;
my $jump_target = '';
my $jump_param = '';
+ my $log_modifier = '';
my $use_netmap = 0;
my $tcp_and_udp = 0;
@@ -154,8 +155,10 @@ sub rule_str {
if ($self->{_exclude}) {
$jump_target = 'RETURN';
+ $log_modifier = 'EXCL';
} elsif (defined($self->{_is_masq})) {
$jump_target = 'MASQUERADE';
+ $log_modifier = 'MASQ';
} else {
$jump_target = 'SNAT';
}
@@ -324,7 +327,7 @@ sub rule_str {
$rule_str .= " $src_str $dst_str" . " -m comment --comment " . $comment;
if ("$self->{_log}" eq "enable") {
my $rule_num = $self->{_rule_number};
- my $log_prefix = get_log_prefix($rule_num, $jump_target, $type);
+ my $log_prefix = get_log_prefix($rule_num, $type, $log_modifier);
if ($tcp_and_udp == 1) {
my $tcp_log_rule = $rule_str;
$tcp_log_rule .= " -j LOG --log-prefix \"$log_prefix\" ";