diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-07-11 17:00:57 -0700 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-07-11 17:00:57 -0700 |
commit | 760876d8328880316720ebce2bdcc1b86372350c (patch) | |
tree | 78a7b20398a338586f793cfd3a0c46daa6a05798 | |
parent | 9bbc84d1df11b6add51cb32346887fe5ca5cc87f (diff) | |
download | vyatta-cfg-vpn-760876d8328880316720ebce2bdcc1b86372350c.tar.gz vyatta-cfg-vpn-760876d8328880316720ebce2bdcc1b86372350c.zip |
fix for bug 3044: hide perl error messages
-rwxr-xr-x | scripts/vpn-config.pl | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index 219c4fe..3a62a04 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -423,9 +423,10 @@ if ($vcVPN->exists('ipsec')) { . 'configured if local IP is 0.0.0.0.' . "\n"; $error = 1; - } - $genout .= "\tleft=%defaultroute\n"; - $genout .= "\tleftid=$authid\n"; + } else { + $genout .= "\tleft=%defaultroute\n"; + $genout .= "\tleftid=$authid\n"; + } } else { $genout .= "\tleft=$lip\n"; } @@ -705,7 +706,8 @@ if ($vcVPN->exists('ipsec')) { } else { $right = $peer; } - my $index1 = ($lip eq '0.0.0.0') ? "$authid" : $lip; + my $index1 = ($lip eq '0.0.0.0' && defined($authid)) + ? "$authid" : $lip; $genout_secrets .= "$index1 $right : PSK \"$psk\"\n"; $genout .= "\tauthby=secret\n"; } elsif (defined($auth_mode) && $auth_mode eq 'rsa') { |