diff options
author | John Southworth <john.southworth@vyatta.com> | 2011-01-26 11:02:32 -0600 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2011-01-26 11:02:32 -0600 |
commit | 0af0fbe9a49d93f9a9368a9e90ebf6e8e9b234f9 (patch) | |
tree | 3c0e716847f24703008b35d071c2a762a77c6160 | |
parent | 8a76011d214a80f5b693501d41da7e461177cfc4 (diff) | |
download | vyatta-cfg-vpn-0af0fbe9a49d93f9a9368a9e90ebf6e8e9b234f9.tar.gz vyatta-cfg-vpn-0af0fbe9a49d93f9a9368a9e90ebf6e8e9b234f9.zip |
Bug 2506: Moved the connection-type node to the peer level, as discussed with support.
-rwxr-xr-x | scripts/vpn-config.pl | 10 | ||||
-rw-r--r-- | templates/vpn/ipsec/site-to-site/peer/node.tag/connection-type/node.def (renamed from templates/vpn/ipsec/site-to-site/peer/node.tag/tunnel/node.tag/connection-type/node.def) | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index a5428f0..e874142 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -650,7 +650,8 @@ if ( $vcVPN->exists('ipsec') ) { 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"); + 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)) { $needs_passthrough = 'true'; @@ -861,7 +862,8 @@ if ( $vcVPN->exists('ipsec') ) { "ipsec site-to-site peer $peer authentication mode"); if ( !defined($auth_mode) || $auth_mode eq '' ) { $error = 1; - Vyatta::Config::outputError(["vpn","ipsec","site-to-site","peer",$peer,"authentication"],"$vpn_cfg_err No authentication mode for peer \"$peer\" specified.\n"); + Vyatta::Config::outputError(["vpn","ipsec","site-to-site","peer",$peer,"authentication"], + "$vpn_cfg_err No authentication mode for peer \"$peer\" specified.\n"); } elsif ( defined($auth_mode) && ( $auth_mode eq 'pre-shared-secret' ) ) { my $psk = $vcVPN->returnValue( "ipsec site-to-site peer $peer authentication pre-shared-secret"); @@ -975,7 +977,7 @@ if ( $vcVPN->exists('ipsec') ) { if ($any_peer) { $genout .= "\tauto=add\n"; } else { - my $conntype = $vcVPN->returnValue("ipsec site-to-site peer $peer tunnel $tunnel connection-type"); + my $conntype = $vcVPN->returnValue("ipsec site-to-site peer $peer connection-type"); if (defined ($conntype)){ if ($conntype eq "initiate"){ $genout .= "\tauto=start\n"; @@ -1104,7 +1106,9 @@ if ($error) { # Return success # exit 0; +sub vpn_die { +} sub write_config { my ( $genout, $config_file, $genout_secrets, $secrets_file ) = @_; diff --git a/templates/vpn/ipsec/site-to-site/peer/node.tag/tunnel/node.tag/connection-type/node.def b/templates/vpn/ipsec/site-to-site/peer/node.tag/connection-type/node.def index a0a9c9e..4794666 100644 --- a/templates/vpn/ipsec/site-to-site/peer/node.tag/tunnel/node.tag/connection-type/node.def +++ b/templates/vpn/ipsec/site-to-site/peer/node.tag/connection-type/node.def @@ -3,6 +3,6 @@ type: txt default: "initiate" syntax:expression: $VAR(@) in "initiate", "respond"; "Invalid connection-type" -val_help: initiate; Act as an initiator or responder [DEFAULT] +val_help: initiate; Act as an initiator or a responder val_help: respond; Act as a responder only |