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>
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);