diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-09-25 17:59:22 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-09-25 17:59:22 -0700 |
commit | 82030f60953db25758559e3cc4f29c894169e394 (patch) | |
tree | 004f91799d208aba49c148e18e98da02c81d8219 /scripts | |
parent | 00fb293b678b48fae9c6792e6044601e16719b13 (diff) | |
download | vyatta-nat-82030f60953db25758559e3cc4f29c894169e394.tar.gz vyatta-nat-82030f60953db25758559e3cc4f29c894169e394.zip |
fix for bug 3717: generate error messages when inbound-interface is set
in masquerade rule
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/VyattaNatRule.pm | 3 |
1 files changed, 3 insertions, 0 deletions
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\""); } |