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

B #4220: avoid VROUTER_KEEPALIVED_ID = 0 (#4620)

This commit is contained in:
Alejandro Huertas Herrero 2020-04-29 19:28:31 +02:00 committed by GitHub
parent 4733263c7b
commit 71f5723be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -490,7 +490,8 @@ Template * VirtualRouter::get_vm_template() const
if (!obj_template->get("KEEPALIVED_ID", keepalived_id))
{
keepalived_id = (oid & 0xFF);
// Keep Alive should be arbitrary unique number from 1 to 255
keepalived_id = (oid % 255) + 1;
}
tmpl->replace("VROUTER_KEEPALIVED_ID", keepalived_id);