summaryrefslogtreecommitdiff
path: root/lib/Vyatta/SrcNatRule.pm
diff options
context:
space:
mode:
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\" ";