In virStorageBackendCreateIfaceIQN() the virRandomBits() is
called in order to use random bits to generate random name for
new interface. However, virAsprintf() is expecting 32 bits and we
are requesting only 30.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
if (virAsprintf(&temp_ifacename,
"libvirt-iface-%08llx",
- (unsigned long long)virRandomBits(30)) < 0)
+ (unsigned long long)virRandomBits(32)) < 0)
return -1;
VIR_DEBUG("Attempting to create interface '%s' with IQN '%s'",