mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
util: set error if DAD is not finished
If DAD not finished in 5 seconds, user will get an unknown error like this: # virsh net-start ipv6 error: Failed to start network ipv6 error: An error occurred, but the cause is unknown Call virReportError to set an error. Signed-off-by: Luyao Huang <lhuang@redhat.com>
This commit is contained in:
parent
7c8250d765
commit
d41a64a194
@ -1398,7 +1398,13 @@ virNetDevWaitDadFinish(virSocketAddrPtr *addrs, size_t count)
|
||||
VIR_FREE(resp);
|
||||
}
|
||||
/* Check timeout. */
|
||||
ret = dad ? -1 : 0;
|
||||
if (dad) {
|
||||
virReportError(VIR_ERR_SYSTEM_ERROR,
|
||||
_("Duplicate Address Detection "
|
||||
"not finished in %d seconds"), VIR_DAD_WAIT_TIMEOUT);
|
||||
} else {
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
cleanup:
|
||||
VIR_FREE(resp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user