diff options
author | rbalocca <rbalocca@vyatta.com> | 2008-04-21 16:31:31 -0700 |
---|---|---|
committer | rbalocca <rbalocca@vyatta.com> | 2008-04-21 16:31:31 -0700 |
commit | 5564178c5cbaeb3364bf696a17992f42fd562424 (patch) | |
tree | 026e815a73c17d9866963f04e9792ece6b75413c /scripts | |
parent | 42dbb61d45dab89bac889cb5b4ed8a77f627bcfe (diff) | |
parent | 148b670a90c70bf8430a8ec3f084aefa7fb2aa27 (diff) | |
download | vyatta-cfg-vpn-hollister.tar.gz vyatta-cfg-vpn-hollister.zip |
Merge branch 'glendale' into hollywoodhollister
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vpn-config.pl | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index 925b234..b82ebfd 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -424,10 +424,6 @@ if ($vcVPN->exists('ipsec')) { # Write tunnel configuration # my $leftsubnet = $vcVPN->returnValue("ipsec site-to-site peer $peer tunnel $tunnel local-subnet"); - if (!defined($leftsubnet) || $leftsubnet eq "") { - $error = 1; - print STDERR "VPN configuration error. No 'local-subnet' specified for peer \"$peer\" tunnel $tunnel.\n"; - } if (defined($leftsubnet) && $leftsubnet eq 'any') { $leftsubnet = '0.0.0.0/0'; } @@ -462,10 +458,6 @@ if ($vcVPN->exists('ipsec')) { $rightsubnet .= ",%no"; } } else { - if (!defined($remotesubnet) || $remotesubnet eq '') { - $error = 1; - print STDERR "VPN configuration error. The 'remote-subnet' has not been specified while 'allow-nat-networks' has not been enabled for peer \"$peer\" tunnel $tunnel. Either one required.\n"; - } $rightsubnet = $remotesubnet; if (defined($rightsubnet) && $rightsubnet eq 'any') { $rightsubnet = '0.0.0.0/0'; @@ -615,6 +607,12 @@ if ($vcVPN->exists('ipsec')) { if (!defined($espmode) || $espmode eq '') { $espmode = "tunnel"; } + if ($espmode eq "transport") { + if (defined $leftsubnet or defined $rightsubnet) { + $error = 1; + print STDERR "VPN configuration error. Can not use local-subnet or remote-subnet when using transport mode\n"; + } + } $genout .= "\ttype=$espmode\n"; # |