diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-28 22:47:27 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-28 22:47:27 -0700 |
commit | 7d181bfaafd262f95bcf13e1c358a043ee6c685c (patch) | |
tree | 5bbec545e8715d2814fa59bde5cfc82404dce70f /scripts | |
parent | 91be36bece8c9ebc1ed89e36a7b2f52fe9a9fb67 (diff) | |
download | vyatta-cfg-7d181bfaafd262f95bcf13e1c358a043ee6c685c.tar.gz vyatta-cfg-7d181bfaafd262f95bcf13e1c358a043ee6c685c.zip |
Fix bug in is_ip_configured
Bug 4311
Doing grep ($ip, @list) will return whole list since it evaluted
$ip as a expression and the result was defined.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/vyatta-interfaces.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/vyatta-interfaces.pl b/scripts/vyatta-interfaces.pl index 25fefc9..c4e5c4e 100755 --- a/scripts/vyatta-interfaces.pl +++ b/scripts/vyatta-interfaces.pl @@ -90,8 +90,8 @@ exit 0; sub is_ip_configured { my ($intf, $ip) = @_; - my @found = grep $ip, Vyatta::Misc::getIP($intf); - return ($#found > 0); + my $found = grep { $_ eq $ip } Vyatta::Misc::getIP($intf); + return ($found > 0); } sub is_ip_duplicate { |