summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2011-01-25 18:19:12 -0600
committerJohn Southworth <john.southworth@vyatta.com>2011-01-25 18:19:12 -0600
commitb6fd4aa5fb2d3e9090107faa833b6201504b0e98 (patch)
tree772a1c57f1fc3d284e27a608dd717d1455dc2aaf
parent2cfe1f5a637471992bd3d6b92a907135c4dfd44f (diff)
downloadvyatta-cfg-vpn-b6fd4aa5fb2d3e9090107faa833b6201504b0e98.tar.gz
vyatta-cfg-vpn-b6fd4aa5fb2d3e9090107faa833b6201504b0e98.zip
Bugfix 6229: don't allow local and remote subnets to be the same
-rwxr-xr-xscripts/vpn-config.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl
index 30ff8ab..fd986cd 100755
--- a/scripts/vpn-config.pl
+++ b/scripts/vpn-config.pl
@@ -648,6 +648,7 @@ if ( $vcVPN->exists('ipsec') ) {
my $localsubnet_object = new NetAddr::IP($leftsubnet);
my $remotesubnet_object = new NetAddr::IP($rightsubnet);
if ($remotesubnet_object == $localsubnet_object) {
+ $error = 1;
Vyatta::Config::outputError(["vpn","ipsec","site-to-site","peer",$peer],"$vpn_cfg_err local-subnet and remote-subnet cannot be the same.\n");
}
if ($remotesubnet_object->contains($localsubnet_object)) {