summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2009-07-10 13:45:49 -0700
committerStig Thormodsrud <stig@vyatta.com>2009-07-10 13:45:49 -0700
commitabfbae9c05c6c7b4bccb2255d91a32ef1bccd1c1 (patch)
treed03177827b7d3cc1eac115f230f731285335c217
parente663bb12dcdec81e68a9640a298907d63d7f8070 (diff)
downloadvyatta-cfg-abfbae9c05c6c7b4bccb2255d91a32ef1bccd1c1.tar.gz
vyatta-cfg-abfbae9c05c6c7b4bccb2255d91a32ef1bccd1c1.zip
Fix 4623: Removing IPSEC VPN config without removing cluster ipsec config drops all interfaces.
Only use substring if necessary.
-rwxr-xr-xlib/Vyatta/Misc.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Vyatta/Misc.pm b/lib/Vyatta/Misc.pm
index 01f1537..7f5e506 100755
--- a/lib/Vyatta/Misc.pm
+++ b/lib/Vyatta/Misc.pm
@@ -225,7 +225,10 @@ sub isClusterIP {
my @services =
$vc->returnValues("cluster group $cluster_group service");
foreach my $service (@services) {
- if ( $ip eq substr( $service, 0, index( $service, '/' ) ) ) {
+ if ($service =~ /\//) {
+ $service = substr( $service, 0, index( $service, '/' ));
+ }
+ if ( $ip eq $service ) {
return 1;
}
}