diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Vyatta/DstNatRule.pm | 7 | ||||
-rw-r--r-- | lib/Vyatta/SrcNatRule.pm | 5 |
2 files changed, 1 insertions, 11 deletions
diff --git a/lib/Vyatta/DstNatRule.pm b/lib/Vyatta/DstNatRule.pm index bd54306..aa419e5 100644 --- a/lib/Vyatta/DstNatRule.pm +++ b/lib/Vyatta/DstNatRule.pm @@ -265,7 +265,7 @@ sub rule_str { if ($use_netmap) { if (!defined $dst->{_network}){ - return ("\ndestination address needs to be defined as a subnet with the same network prefix as translation address" . + return ("\ndestination address needs to be defined" . "\nwhen translation address is defined with a prefix for static network mapping " , undef); } @@ -274,11 +274,6 @@ sub rule_str { my $dst_addr_mask = $dst->{_network}; $inside_addr_mask =~ s/.+\///; $dst_addr_mask =~ s/.+\///; - if (!($inside_addr_mask == $dst_addr_mask)) { - return ("\ndestination address should be a subnet with the same network prefix as translation address" . - "\nwhen translation address is defined with a prefix for static network mapping" - , undef); - } if ($dst->{_network} =~ /\!/) { return ("\ncannot define a negated destination address when translation address" . diff --git a/lib/Vyatta/SrcNatRule.pm b/lib/Vyatta/SrcNatRule.pm index 52227a5..dfb6f28 100644 --- a/lib/Vyatta/SrcNatRule.pm +++ b/lib/Vyatta/SrcNatRule.pm @@ -305,11 +305,6 @@ sub rule_str { $outside_addr_mask =~ s/.+\///; $src_addr_mask =~ s/.+\///; - if (!($outside_addr_mask == $src_addr_mask)) { - return ("\nsource address should be a subnet with the same network prefix as translation address" . - "\nwhen translation address is defined with a prefix for static network mapping " - , undef); - } if ($src->{_network} =~ /\!/) { return ("\ncannot define a negated source address when translation address" . |