From 82030f60953db25758559e3cc4f29c894169e394 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 25 Sep 2008 17:59:22 -0700 Subject: fix for bug 3717: generate error messages when inbound-interface is set in masquerade rule --- scripts/VyattaNatRule.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/VyattaNatRule.pm b/scripts/VyattaNatRule.pm index 03240bc..a5a96ae 100644 --- a/scripts/VyattaNatRule.pm +++ b/scripts/VyattaNatRule.pm @@ -186,6 +186,9 @@ sub rule_str { $to_src .= "$start-$stop"; } + return (undef, 'cannot specify inbound interface with "masquerade"') + if (defined($self->{_inbound_if}) && ($self->{_type} eq "masquerade")); + if (($to_src ne "") && ($self->{_type} eq "masquerade")) { return (undef, "cannot specify outside IP address with \"masquerade\""); } -- cgit v1.2.3