1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-22 18:50:08 +03:00

F #3206 Manage nils macs in fsck

This commit is contained in:
Christian González 2019-04-09 16:16:42 +02:00 committed by Ruben S. Montero
parent 8b96dd6142
commit b11c8a5566
2 changed files with 3 additions and 1 deletions

View File

@ -527,7 +527,7 @@ EOT
end
def mac_s_to_i(mac)
return nil if mac.empty?
return nil if mac.nil? || mac.empty?
return mac.split(":").map {|e|
e.to_i(16).to_s(16).rjust(2,"0")}.join("").to_i(16)
end

View File

@ -391,6 +391,8 @@ module OneDBFsck
end
counter_ar.each do |mac, counter_lease|
next if mac.nil?
index = ((mac & 0xFFFFFFFF) - (first_mac & 0xFFFFFFFF) ) % 0x100000000
new_lease_obj = ""