diff options
author | John Southworth <john.southworth@vyatta.com> | 2012-02-29 19:18:26 +0000 |
---|---|---|
committer | John Southworth <john.southworth@vyatta.com> | 2012-02-29 19:18:26 +0000 |
commit | ca9a5fbd1e56f729382ab5709f7383e648c4708e (patch) | |
tree | 90a16b8ee93b8d57e97788615e44885d7460b2a3 | |
parent | be3d405977166e2088e0c4ba9be8a312e0eb4e3d (diff) | |
download | vyatta-cfg-vpn-ca9a5fbd1e56f729382ab5709f7383e648c4708e.tar.gz vyatta-cfg-vpn-ca9a5fbd1e56f729382ab5709f7383e648c4708e.zip |
Fix uninitilized bug
-rwxr-xr-x | scripts/vpn-config.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/vpn-config.pl b/scripts/vpn-config.pl index faf7bb2..7c7f976 100755 --- a/scripts/vpn-config.pl +++ b/scripts/vpn-config.pl @@ -930,7 +930,8 @@ if ( $vcVPN->exists('ipsec') ) { "ipsec site-to-site peer $peer authentication pre-shared-secret"); my $orig_psk = $vcVPN->returnOrigValue( "ipsec site-to-site peer $peer authentication pre-shared-secret"); - if ($psk ne $orig_psk){ + $orig_psk = "" if (!defined($orig_psk)); + if ($psk ne $orig_psk && $orig_psk ne ""){ print "WARNING: The pre-shared-secret will not be updated until the next re-keying interval\n"; print "To force the key change use: 'reset vpn ipsec-peer'\n"; } |