summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Misc.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Vyatta/Misc.pm')
-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;
}
}