summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2021-09-07 19:04:21 +0700
committerGitHub <noreply@github.com>2021-09-07 19:04:21 +0700
commitd2d4361bffaa0b99c85c7fbf46ddd760ae6512f0 (patch)
treea0402a630f3bdc58333948bcddec91e7e9175f56
parent2cec760601a6e85ca8e0b6a30c173196a97a777a (diff)
parent05409387e903447f76c6bbafb874d14f2c2e30db (diff)
downloadvyatta-cfg-vpn-d2d4361bffaa0b99c85c7fbf46ddd760ae6512f0.tar.gz
vyatta-cfg-vpn-d2d4361bffaa0b99c85c7fbf46ddd760ae6512f0.zip
Merge pull request #48 from jestabro/T3808
ipsec: T3808: add missing exit if 'vpn ipsec' has been deleted
-rwxr-xr-xscripts/dmvpn-config.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/dmvpn-config.pl b/scripts/dmvpn-config.pl
index 5562a7c..d482432 100755
--- a/scripts/dmvpn-config.pl
+++ b/scripts/dmvpn-config.pl
@@ -485,6 +485,11 @@ if (!(defined($config_file) && ( $config_file ne '' ))) {
write_config( $genout, $config_file);
+# Now exit, if 'vpn ipsec' has been deleted.
+if ( !$vcVPN->exists('ipsec') ) {
+ exit(0);
+}
+
my $update_interval = $vcVPN->returnValue("ipsec auto-update");
my $update_interval_orig = $vcVPN->returnOrigValue("ipsec auto-update");
$update_interval_orig = 0 if !defined($update_interval_orig);