diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2009-07-10 13:45:49 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2009-07-10 14:11:07 -0700 |
commit | 17a18feb3c5c36b78d14b7552848ad2b5364e98e (patch) | |
tree | 94b2f767444352935dc723c2b1a36c6c3052825d /lib | |
parent | 17918289b5d31af6ffef14d2f6bec1a5e2be0e3e (diff) | |
download | vyatta-cfg-17a18feb3c5c36b78d14b7552848ad2b5364e98e.tar.gz vyatta-cfg-17a18feb3c5c36b78d14b7552848ad2b5364e98e.zip |
Fix 4623: Removing IPSEC VPN config without removing cluster ipsec config drops all interfaces.
Only use substring if necessary.
(cherry picked from commit abfbae9c05c6c7b4bccb2255d91a32ef1bccd1c1)
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Vyatta/Misc.pm | 5 |
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; } } |