summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Vyatta/Cluster/Config.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Vyatta/Cluster/Config.pm b/lib/Vyatta/Cluster/Config.pm
index 5756567..57032a8 100644
--- a/lib/Vyatta/Cluster/Config.pm
+++ b/lib/Vyatta/Cluster/Config.pm
@@ -332,6 +332,15 @@ sub haresources {
foreach (@{$hashref->{_service}}) {
if (!isValidIPSpec($_)) {
if (isValidService($_)) {
+ if ($_ eq 'ipsec') {
+ # check if ipsec is configured
+ my $config = new Vyatta::Config;
+ $config->setLevel('vpn');
+ my @nodes = $config->listOrigPlusComNodes();
+ if (! grep(/^ipsec$/, @nodes)) {
+ return (undef, "ipsec is not configured");
+ }
+ }
push @init_services, $_;
} else {
return (undef, "\"$_\" is not a valid IP address "