diff options
author | Stig Thormodsrud <stig@vyatta.com> | 2009-07-10 13:45:49 -0700 |
---|---|---|
committer | Stig Thormodsrud <stig@vyatta.com> | 2009-07-10 13:45:49 -0700 |
commit | abfbae9c05c6c7b4bccb2255d91a32ef1bccd1c1 (patch) | |
tree | d03177827b7d3cc1eac115f230f731285335c217 | |
parent | e663bb12dcdec81e68a9640a298907d63d7f8070 (diff) | |
download | vyatta-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-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; } } |