diff options
Diffstat (limited to 'lib/Vyatta/SrcNatRule.pm')
-rw-r--r-- | lib/Vyatta/SrcNatRule.pm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Vyatta/SrcNatRule.pm b/lib/Vyatta/SrcNatRule.pm index 1fdc383..89623a4 100644 --- a/lib/Vyatta/SrcNatRule.pm +++ b/lib/Vyatta/SrcNatRule.pm @@ -288,13 +288,6 @@ sub rule_str { my ($dst_str, $dst_err) = $dst->rule(); return ($dst_err, undef) if (!defined($dst_str)); - if ((grep /multiport/, $src_str) || (grep /multiport/, $dst_str)) { - if ((grep /sport/, $src_str) && (grep /dport/, $dst_str)) { - return ('cannot specify multiple ports when both source and destination ' - . 'ports are specified', undef); - } - } - # if using netmap then source address should have the same prefix # as the outside|inside address depending on the whether the type is src|dst if ($use_netmap) { @@ -330,7 +323,8 @@ sub rule_str { if ($tcp_and_udp == 1) { $comment = "\"$type-NAT-$self->{_rule_number} tcp_udp\" "; } - $rule_str .= " $src_str $dst_str" . " -m comment --comment " . $comment; + my $src_dst_str = make_src_dst_str($src_str, $dst_str); + $rule_str .= " $src_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, $type, $log_modifier); |